Way To sync barcode scanner to excel

MarkusMD

New Member
Joined
Aug 30, 2017
Messages
3
Hello There!

I'm looking for a solution to my problem and have not found anything online, so I'm coming to you.

So, this is what I'm looking for:

The barcode scanner I have is a keyboard type and works well with Excel, but...
1. When scanning a barcode, I want ActiveSheet to automatically open a Userform
2. The Userform should show the scanned barcode in a Locked Textbox
3. I want the sub to look through a list of existing barcodes to see if it exists.

It's a lot but the crusial part is no. 1, The rest I think I can figure out but would not say no to some help.


Best Regards
MarkusMD
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
For no. 1 this might work for you.

In the ThisWorkbook code module try this change event macro.

Assumes the barcode is scanned into cell M5 of the active sheet AND the scanned barcode entry into M5 is the same as if you typed a value/text into M5 and hit enter.

Howard

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  If Intersect(Target, Range("$M$5")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
  UserForm1.Show '// your userform name here
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top