Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:18:38+00:00 2026-06-14T16:18:38+00:00

I have a barcode scanner. So when the barcode is scanned using a gun,

  • 0

I have a barcode scanner. So when the barcode is scanned using a gun, the value normally is entered to textfield placed on the screen.

So I have made an excel macro. And when the barcode is scanned, the text appears on the cell ending with the new line character (text+”\r\n” is provided by the scanner itself). So an event is triggered and does the rest.

The problem is that the event is only triggered with a new line character. What if the barcode scanner didn’t provide \r\n after every barcode output. How do I deal with such situations?
How do I detect it and trigger event?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:18:42+00:00Added an answer on June 14, 2026 at 4:18 pm

    If you create a userform to take the input, you can use the keydown or keypress events to detect keys pressed. You would have to know what the end condition of the barcode would be, so you know when to send the value to the cell to be processed.

    Keydown will give you shift state, and also capture pageup/pagedown/other special keys

    Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
        ByVal Shift As Integer)
    

    Keypress will only work with keys that produce a typeable character

    Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    

    Without userforms, you will have to rely on enter/newline to trigger the Change event in the worksheet

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project i have to read barcodes using barcode scanner Symbol CS3070 through
hopefully a simple question here, i have a barcode scanner using Zxing, this is
I have implement Zxing Barcode Scanner in ipad using PhoneGap 1.7.0 and Zxing Barcode
I have scanned the barcode using ZBar SDK which scans barcode by opening camera.
I have a barcode scanner and laptop (ofcourse :)), I'm looking for simple event
I want to integrate the zxing barcode scanner into my app. I have followed
i am new in this Field.I have implemented BarCode Scanner.I have got the Proper
I am using a barcode scanner to enter in data and then send the
I am using Jdeveloper 11g , and wanted to develop a barcode scanner in
Is it possible to have the barcode scanner (zxing for example) called instead of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.