PC Review


Reply
Thread Tools Rate Thread

Barcode Scanner

 
 
Greg B
Guest
Posts: n/a
 
      4th Jul 2009
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 With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      4th Jul 2009
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net and Barcode Scanner chris_gpf1@hotmail.com Microsoft ASP .NET 2 27th Jul 2007 04:45 PM
XML FTP on Barcode scanner =?Utf-8?B?QW5u?= Microsoft Dot NET 0 20th Sep 2005 07:48 PM
Barcode Scanner with ADF Henry Scanners 0 12th Dec 2004 08:44 AM
barcode scanner john white Microsoft Windows 2000 Hardware 2 18th Aug 2004 10:18 PM
barcode scanner Adam Snider Microsoft Dot NET Compact Framework 6 2nd Aug 2004 03:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:06 AM.