Barcode Reader with Userform textbox

dktx2016

New Member
Joined
Nov 16, 2016
Messages
5
Hi All,

I have a barcode scanner which I use to scan information directly into cells and it works great.
I have created a Userform with a Textbook but when I try to scan some barcodes with the same barcode scanner into the textbox nothing happens. Do I have to change some properties of the textbook?

Thank you,

David
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hello dktx2016,

For this to work, the UserForm must be shown non-modally. I have 2 macros here. One will show the UserForm non-modally and the second will fill the TextBox on the UserForm with the ActiveCell.
You will need to change the name of the UserForm and TextBox in the code to match your own.

Module Macro
This will display the UserForm non-Modally.
Code:
Sub ShowForm()
    ' // Change the UserForm's name to match yours.
    UserForm1.Show False
End Sub

Worksheet Event Macro
Add this macro to the Worksheet where the data will be entered.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    
        If UserForms.Count Then
            With UserForms(0)
                .Hide
                ' // Change the name o the TextBox to match yours.
                .TextBox1.Value = Target.Text
                .Show False
            End With
        End If
        
End Sub
 
Upvote 0
I repeat my question.
Can you post the code you use that places the scan result in the worksheet cell?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,947
Members
449,095
Latest member
nmaske

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