Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Barcode Scanner
Hi I have a question, I have fair knowledge of excel but I am trying to
build a userform which can be used as a interface with the database I have created. The trouble I am having is I have the following code to look up some information and it gives me the item I am looking for. But if I use the barcode scanner and scan the proper barcode on the item it does not recognise it at all. Why is this and how can I fix it thanks in advance Greg B Dim ansD3 Sheet1.Activate On Error Resume Next ansD3 = Application.Match(CLng(bcscan.value), Range("A:A"), 0) If Not IsError(ansD3) Then itembox.value = Application.Index(Range("b:b"), ansD3) End If On Error GoTo 0 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Barcode Scanner
Why use a worksheet function match when you can do it more eficiently in VBA
with sheets("Sheet1") Data = CLng(bcscan.value) set c = .Columns("A").find(what:=Data, _ lookin:=xlvalues, lookat:=xlwhole) if not c is nothing then itembox.value = c.offset(0,1) end if end with "Greg B" wrote: Hi I have a question, I have fair knowledge of excel but I am trying to build a userform which can be used as a interface with the database I have created. The trouble I am having is I have the following code to look up some information and it gives me the item I am looking for. But if I use the barcode scanner and scan the proper barcode on the item it does not recognise it at all. Why is this and how can I fix it thanks in advance Greg B Dim ansD3 Sheet1.Activate On Error Resume Next ansD3 = Application.Match(CLng(bcscan.value), Range("A:A"), 0) If Not IsError(ansD3) Then itembox.value = Application.Index(Range("b:b"), ansD3) End If On Error GoTo 0 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Barcode Scanner | Excel Discussion (Misc queries) | |||
Barcode scanner and quantities | Setting up and Configuration of Excel | |||
barcode scanner and excel | Excel Worksheet Functions | |||
barcode scanner | Excel Discussion (Misc queries) | |||
Barcode Scanner and macro question | Excel Programming |