chipsworld
Board Regular
- Joined
- May 23, 2019
- Messages
- 164
- Office Version
- 365
G'Day,
Need some guidance...
I have a userform that has a single textbox (txtsrch). The issue is that, I want to scan the UPC barcode on a product and use that to do a vlookup in a sheet.
I immediately ran into a problem where the textbox does not capture the leading "0" in SOME of the barcodes.
Additional info:
Some barcodes are alpha-numeric
Not all barcodes have a leading zero.
Need to be able to pass the textbox into the vlookup, but as scanned. TO include any leading zeros.
As always...thank you.
Need some guidance...
I have a userform that has a single textbox (txtsrch). The issue is that, I want to scan the UPC barcode on a product and use that to do a vlookup in a sheet.
I immediately ran into a problem where the textbox does not capture the leading "0" in SOME of the barcodes.
Additional info:
Some barcodes are alpha-numeric
Not all barcodes have a leading zero.
Need to be able to pass the textbox into the vlookup, but as scanned. TO include any leading zeros.
VBA Code:
Dim txtsrchval As String
txtsrchval = Application.WorksheetFunction.VLookup(Me.txtsrch.Text, Worksheets("Inventory").Range("A:F"), 4, False)
As always...thank you.