Results 1 to 6 of 6

[SOLVED] Forms: wait until textbox string is finished with a return key before a vlookup

Threaded View

  1. #1
    Registered User
    Join Date
    01-04-2004
    Location
    Netherlands
    MS-Off Ver
    2019
    Posts
    65

    [SOLVED] Forms: wait until textbox string is finished with a return key before a vlookup

    Hiho,

    We want to use a barcode scanner to help with our inventory management.
    When scanning, the scanner actually 'types' in keys followed by the enter key. (i.e. "Big box of bolts")
    With a custom form I want to scan a barcode, then perform a lookup to find item information. (i.e. "These are M10 bolts made from steel")

    Since there are many inventory items, I want minimal use of keyboard and mouse for the operator.
    A custom form will do the job!

    I want to let the barcode scanner fill out a textbox, and then use this value in a lookup to find the other information.

    This is what I do now:
    ScannedItem = TextBox1.Text
    
    ScannedItemDesc = Application.VLookup(ScannedItem, Worksheets("Data").Range("a2:f450"), 3, False)
    The problem is, it will do the Vlookup after each entered character that is placed in the textbox. It doesn't wait for the enter key to be pressed to 'confirm' the entry.

    So it doesn't wait for "Big Box Of Bolts" to be entered, it will see "B" and try to look that up.

    How can I make the textbox more patient so it only goes ahead with the lookup after it actually recognizes a text being completed by the enter key?

    Cheers!
    Niels
    Last edited by niels007; 11-13-2018 at 05:28 AM. Reason: Solved!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Only run VLookup when all data is finished?
    By taylorsm in forum Excel General
    Replies: 1
    Last Post: 09-27-2016, 10:33 AM
  2. VBA code to return 2 vlookup values into 1 textbox on userform
    By gemnnsw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2016, 10:52 AM
  3. [SOLVED] How to set Vlookup from a string of text in a cell and return the same manner
    By cathchin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2012, 04:14 AM
  4. Replies: 3
    Last Post: 01-04-2012, 01:32 PM
  5. Replies: 2
    Last Post: 12-31-2011, 06:41 AM
  6. Return a text string when the result of VLOOKUP formula is #N/A
    By jeremy nickels in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2006, 12:30 PM
  7. [SOLVED] Wait until MSQuery Refresh finished
    By ChrisR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2005, 01:05 PM

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