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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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