+ Reply to Thread
Results 1 to 23 of 23

VLookup error in the Userform

Hybrid View

  1. #1
    Registered User
    Join Date
    01-10-2018
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    31

    Re: VLookup error in the Userform

    Thank you all for your help. It is interesting that the code is working perfectly for one Userform (Received), but for the other userform in the same spreadsheet is not. The only different is "txt2DBarcode" changed to "txt2DBarcode_A".

    Run-time error '1004': Unable to get the VLookup property of the worksheetFunction class.

    HTML Code: 

  2. #2
    Registered User
    Join Date
    01-10-2018
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    31

    Re: VLookup error in the Userform

    I was wrong. I can see this error on my all userforms.

    Untitled1.jpg

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,301

    Re: VLookup error in the Userform

    It may be that leading zeroes are being removed. Try adding a leading single quote to prevent autocasting of the string: Add

    "'" &

    before the Left, like:

    .... VLookup("'" & Left(txt2DBarcode.Text,16),......_
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Registered User
    Join Date
    01-10-2018
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    31

    Re: VLookup error in the Userform

    Quote Originally Posted by Bernie Deitrick View Post
    It may be that leading zeroes are being removed. Try adding a _
    Still I have debug.

+ 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. [SOLVED] Unable to Get userForm to Recognise code. With Error message regarding VLookup
    By Mark Dynes in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-08-2017, 01:20 PM
  2. Replies: 2
    Last Post: 01-12-2017, 09:51 PM
  3. [SOLVED] userform vlookup 424 error
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2016, 05:33 PM
  4. Error trying to import userform into Outlook: Unable to load UserForm.FRX
    By jeffclanders in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2016, 12:36 PM
  5. Userform to return vlookup then reference vlookup text
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2016, 02:09 PM
  6. [SOLVED] Userform vlookup - error when name not in spreadsheet
    By glynnhicks in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2013, 03:33 AM
  7. UserForm, Vlookup Error when the form is done.
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2010, 05:12 PM

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