Updating userform textboxes after reading from a barcode scanner

SINGERT

New Member
Joined
Jun 25, 2015
Messages
11
Hello all,
I have googled this 6-ways from Sunday and nothing of what I've found has been quite what I'm looking for (or maybe it was, I just didn't recognize it)...What I am trying to do, is scan a barcode which will then populate my userform with the information automatically. What I am getting is that for some reason I have to click back onto the barcode text box, then into another textbox before it updates (it automatically "tabs" to the next textbox after scanning). I would like to be able to just scan the label and be ready to move on. I am currently using the Exit feature on the barcode textbox, but have tried the AfterUpdate as well with no luck. Any help would be appreciated!!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
if you only want the barcode box to work for text entry, set the property TabStop = False for all the other controls
 
Upvote 0
When I tried this, it didn't do anything, just sat there with the barcode information in the textbox. Granted it didn't tab to the next field, but it still isn't updating the other textboxes. I'm looking for something to automatically trigger the exit event when the barcode is scanned into the textbox, thus filling in the rest of my textboxes with the information. Thanks for your help though!
 
Upvote 0
Anybody else have any ideas?? Took a break from it for a while, and amazingly, still not working! lol. I'll add some more info: I'm using Access for the database storage. When the barcode is scanned, it enters it onto an Excel spreadsheet with a Microsoft Query that then pulls the appropriate record. That information is what needs to go onto my userform. What I am getting is that everything works (barcode scans, information is pulled to Excel), but my userform doesn't update the textboxes from Excel...Not sure what I'm doing wrong...Here is my code:
\
Code:
Private Sub Barcode_Scan_Exit(ByVal cancel As MSForms.ReturnBoolean)


Dim ps, lc, SB As String
Dim Qty, Die As Integer


ThisWorkbook.Sheets("Assumptions").Select
Cells(2, 18) = Barcode_Scan.Value


    ThisWorkbook.Sheets("IssueOut").Select


    SB = Cells(2, 3)
    ps = Cells(1, 3)
    lc = Cells(3, 1)
    Qty = Cells(3, 3)
    Die = Cells(2, 4)


Status_Box.Value = SB
Part_Box.Value = ps
Qty_Box.Value = Qty
Location_Box.Value = lc
Die_Box.Value = Die


End Sub
 
Upvote 0
Okay, so what I did to get this working was bypass using the cells() reference for the variables. Instead I just used FindFirst and then pulled my values directly from Access to the variables. Works great like this.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

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