+ Reply to Thread
Results 1 to 4 of 4

VBA to look up part number when scanning a barcode

  1. #1
    Registered User
    Join Date
    01-24-2014
    Location
    Los Angeles, Ca.
    MS-Off Ver
    Excel 2010
    Posts
    13

    VBA to look up part number when scanning a barcode

    I have a USB scanner connected to a PC. Data is entered into Excel when the part number barcode on a box is scanned. I have two worksheets that I will be scanning part numbers into, one is Group A and the other is Group B. On Group A's sheet there is a list of Group B part numbers that will be used for the lookup procedure when the barcode is scanned. The same is true for Group B's sheet. The groups should never be mixed, so if part number "B005" is scanned into Group A's sheet it should cause an error message to pop up. I've attached a workbook as an example. Is it possible to do this with VBA?

    Thanks

    Barcode Scan Lookup.xlsx

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA to look up part number when scanning a barcode

    Can't you adapt the code I wrote for you in this thread: http://www.excelforum.com/excel-prog...a-barcode.html
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA to look up part number when scanning a barcode

    Hi Drake,

    Try this in the "ThisWorkbook" module and save your Workbook as Macro Enabled:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-14-2014 at 09:28 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    01-24-2014
    Location
    Los Angeles, Ca.
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: VBA to look up part number when scanning a barcode

    OllyXLS, since VBA is very new to me, I'm not sure how I would go about adapting the code you wrote.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Switch between worksheets by scanning a barcode
    By Drake2007 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-17-2014, 06:26 PM
  2. barcode scanning template
    By donkey_uk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2013, 12:19 PM
  3. Barcode Scanning - Library
    By _LG_ in forum Excel General
    Replies: 1
    Last Post: 12-05-2011, 11:55 AM
  4. Barcode scanning inventory management with running totals
    By PGOIBOY in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-04-2011, 04:19 PM
  5. does excel support barcode scanning?
    By Jase in forum Excel General
    Replies: 8
    Last Post: 12-07-2005, 06:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1