+ Reply to Thread
Results 1 to 7 of 7

referencing listbox entry in new userform

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    referencing listbox entry in new userform

    From a DblClick event on an entry in "DDlst_2" listbox on a userform called F03_DriverDetail I am trying to populate textboxes on a new userform but cant find the right syntax

    I have tried various but keep getting an error message highlighting "ListIndex" as if it cannot see the list index in DDlst_2

    Any help appreciated

    Please Login or Register  to view this content.
    Last edited by nigelog; 02-27-2017 at 06:36 AM.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: referencing listbox entry in new userform

    Hi,

    The Listindex in your code refers to F07_Viewer. I presume you meant to refer to F03_DriverDetail.DDlst_2.ListIndex?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: referencing listbox entry in new userform

    Yes...F07_Viewer is the new userform and I want to display the listindex value of the previous userform
    Last edited by nigelog; 02-27-2017 at 06:22 AM.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: referencing listbox entry in new userform

    Then the code ought to read
    Please Login or Register  to view this content.
    although I would personally load the control values from the other form.

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: referencing listbox entry in new userform

    Thankyou.... Appreciated
    How would I do that??

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: referencing listbox entry in new userform

    In the other form's code you would use
    Please Login or Register  to view this content.

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: referencing listbox entry in new userform

    Thanks again....perfect..

+ 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. Userform to search database using wildcard entry in a listbox
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2016, 10:14 AM
  2. [SOLVED] Referencing ListBox value in UserForm issues
    By strud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2014, 06:46 AM
  3. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  4. Userform with Data Entry and Listbox Population
    By BigSi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-01-2011, 09:40 AM
  5. delete entry on worksheet via userform listbox
    By confused325 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2009, 12:19 PM
  6. Userform Listbox For User Entry?
    By DCSwearingen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2007, 12:53 PM
  7. [SOLVED] Userform: listbox and controls' data entry validation
    By sebastienm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2005, 09:05 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