+ Reply to Thread
Results 1 to 2 of 2

Listbox then vlookup to set text issue

  1. #1
    Registered User
    Join Date
    08-19-2015
    Location
    Traverse City
    MS-Off Ver
    2011
    Posts
    3

    Question Listbox then vlookup to set text issue

    Total Noob

    I have a listbox pulling an array of part numbers (column A) to select from.

    The issue is when selecting the part number in the listbox I need to Vlook to the corresponding part number (column B) in the cell to the right to be selected.



    Original Code

    PartNumber = UserForm1.TextBox1.Text


    I'm thinking it needs to be this:

    PartNumber = UserForm1.ListBox1.Selected = .listbox1.listindex.Range ("B")
    Last edited by pyromorphous; 08-19-2015 at 02:44 PM.

  2. #2
    Registered User
    Join Date
    08-19-2015
    Location
    Traverse City
    MS-Off Ver
    2011
    Posts
    3

    Re: Listbox then vlookup to set text issue

    I resolved the previous issue using a textbox to be filled using the code below.

    PartNumber = Userform1.TextBox3.value
    Me.TextBox3.Value = Application.VLookup(ListBox1.Value, Sheet5.Range("A2:B2"), 2, False)

+ 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. User Form ListBox - Find Records (ListBox Populating Issue)
    By LONeillSSC in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-20-2015, 12:06 PM
  2. Read text file to ListBox and Delete rows in ListBox and re-write text file
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2012, 09:42 AM
  3. How to popoulate multioption listbox from another listbox using vlookup?
    By Kiran2012 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2012, 05:32 AM
  4. Listbox issue
    By bobaftt in forum Excel General
    Replies: 1
    Last Post: 12-15-2010, 09:47 PM
  5. Listbox on a userform issue
    By insanity66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2010, 03:30 AM
  6. listbox issue
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2008, 03:11 AM
  7. UserForm Listbox issue
    By bach in forum Excel General
    Replies: 29
    Last Post: 10-06-2005, 09:05 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