UPC scanner to read translated barcodes into the search field

In Calc: I want to use a UPC scanner to read barcodes into the search field so that I can locate the item in the CALC product list. Anyone have experience? I have code to translate the scanned barcode into arabic numbers and can type the arabic into the search field to get the item. I want to incorporate that code (through a macro?) as opposed jumping back and forth between the two apps. Anyone have experience? Thanks.