+ Reply to Thread
Results 1 to 4 of 4

using a listbox, how to get the selected item

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    using a listbox, how to get the selected item

    here is my code for a userform. basically it auto populates with a list of filenames, and that is working ok. but when i selected the file and press the open button (commandbutton1),then it gives me a weird error (like false.xlsx, cant open). what am i doing wrong?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: using a listbox, how to get the selected item

    Please Login or Register  to view this content.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,300

    Re: using a listbox, how to get the selected item

    Also note it's:

    Please Login or Register  to view this content.
    not:

    Please Login or Register  to view this content.
    Anyone who confuses correlation and causation ends up dead.

  4. #4
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: using a listbox, how to get the selected item

    thanks @kyle and @rorya, appreciate the help. the filename was a goof on my part and i don't know why i didn't try value first.

+ 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] Moving all columns from listbox 1 to listbox 2 and see all details of an selected item
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2018, 07:09 PM
  2. [SOLVED] ToolTip for listbox selected item
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-19-2018, 03:49 AM
  3. [SOLVED] Do something for each selected item in a listbox
    By stojko89 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2017, 06:38 AM
  4. Get the name of a listbox where an item is selected
    By Jerbinator in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2016, 03:16 PM
  5. Selected item in first listbox.
    By waka in forum Access Tables & Databases
    Replies: 1
    Last Post: 02-09-2015, 11:45 PM
  6. [SOLVED] Macro to run when item is selected from listbox
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-30-2014, 09:58 PM
  7. Remove selected item from listbox
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-28-2014, 08:36 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