+ Reply to Thread
Results 1 to 6 of 6

Barcode scan to pull product data into VBA userform?

  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    Bee Lick, KY
    MS-Off Ver
    2024
    Posts
    14

    Barcode scan to pull product data into VBA userform?

    ​I have pulled my hair to no ends scouring the web for hours trying to save this post.

    I have an Invoice workbook, and the "UPC-SKU" sheet that has barcodes, descriptions, prices, tax specifier, and inventory qty. I already have two vba userforms, userform1 to add new products and userform2 to update only the inventory qty of a specified item when the barcode is scanned. What I want is to create a third named userform3, it will look exactly like userform1, but instead of it adding new data to the sheet, I need it to search the list, find the barcode and populate the userform with the data from the barcode and then let me update the sheet with changes made in userform3.

    I know this should be possible, I'm just not sure how to make it happen, I have spent most of the past two days piecing different segments of code together hoping to get something to work, but so far nothing.

    I think I have attached a drastically deflated version of my big Invoice workbook.
    InvoiceTEST.xlsm

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,975

    Re: Barcode scan to pull product data into VBA userform?

    Rather than have another userform, you could just modify Userform2 so that if the barcode exists it updates, if not it adds.
    E.g. as attached.
    Attached Files Attached Files

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,276

    Re: Barcode scan to pull product data into VBA userform?

    Or with a third userform as requested.
    Attached Files Attached Files
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    03-09-2017
    Location
    Bee Lick, KY
    MS-Off Ver
    2024
    Posts
    14

    Re: Barcode scan to pull product data into VBA userform?

    Quote Originally Posted by ByteMarks View Post
    Rather than have another userform, you could just modify Userform2 so that if the barcode exists it updates, if not it adds.
    E.g. as attached.


    Phenomenal! Exactly what I was thinking of and hoping for! This will save me many hours of manual 'Ctrl+F' searching to update products!

    Thank you so kindly!

  5. #5
    Registered User
    Join Date
    03-09-2017
    Location
    Bee Lick, KY
    MS-Off Ver
    2024
    Posts
    14

    Re: Barcode scan to pull product data into VBA userform?

    Quote Originally Posted by bakerman2 View Post
    Or with a third userform as requested.
    Thanks for the work and reply. However, after trying both yours and ByteMarks' version, I do believe his fits my need better.

    Thanks

  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,975

    Re: Barcode scan to pull product data into VBA userform?

    You're welcome

+ 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. Barcode scan to Excel
    By woodland81 in forum Excel General
    Replies: 3
    Last Post: 02-17-2022, 12:40 PM
  2. Barcode scan
    By jeffrey.farnham in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-11-2022, 08:51 PM
  3. Get data from Excel spreadsheet via Barcode scan
    By 2vbr in forum Excel General
    Replies: 3
    Last Post: 03-02-2020, 10:55 AM
  4. Barcode scan data entry
    By Shamz41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2017, 08:17 AM
  5. Barcode scan + print label and save data
    By Exile04 in forum Excel General
    Replies: 1
    Last Post: 02-03-2016, 02:39 AM
  6. Scan-in, Scan-out tool inventory with barcode scanner
    By rycr023 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2014, 11:52 AM
  7. Scan barcode and go to next row
    By dsr301 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2012, 11:33 AM

Tags for this Thread

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