+ Reply to Thread
Results 1 to 13 of 13

How show in Listbox (userform) specific files

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    How show in Listbox (userform) specific files

    Hi

    I have in column E name files.

    i need show inside listbox specific files (not all files), in folder, using range in sheet.

    Goal: show file based name file in range inside ListBox.

    Cross-Post
    http://forum.chandoo.org/threads/lis...c-files.22531/

    Att
    Attached Images Attached Images
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    Hi any idea?

    Look my image and file to understand.
    Attached Images Attached Images
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    Not 100% sure if this is what you want, but...
    Please Login or Register  to view this content.
    If you are pleased with a member's answer then use the Star icon to rate it.

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    How do when i click in button
    Please Login or Register  to view this content.
    and list files inside folder based my tab Sheet1 column E?

    Att
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    Please Login or Register  to view this content.
    However I would recommend using the Initialize event (see the code from my previous post). This way listbox will be populated during userform load. no need to click the button.

  6. #6
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    ok, my code get real file inside folder, your code not get real file insede folder.

    Please Login or Register  to view this content.
    When i inser in column E a false name file, you code list this false file, but this false file not exist in folder.

  7. #7
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    sorry, I don't get what you want...
    files from the folder (that's what you have now) or file names from column E (that's what my code does) or something else e.g. only existing files, which are listed in column e?

  8. #8
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    Imagine you have, 120.000 files in a folder.
    but you need to list a few (column E).

    In column E has the name of the files that I wish list

  9. #9
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    that is what my code produces and it look exactly like your example
    Clipboard01.jpg

  10. #10
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    ok, you code get value in column E.

    I need code shearch name (based Column E), go to folder, if file name in column E exist in side folder then list them.

  11. #11
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    Quote Originally Posted by marreco View Post
    if file name in column E exist in side folder then list them.
    That is something you never mentioned (i.e. check if file exists), but anyway...

    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How show in Listbox (userform) specific files

    Hi buran, good good!!!

    Thank you!!!!!!!!!!!

  13. #13
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How show in Listbox (userform) specific files

    Great! Sorry for the initial misunderstanding :-)
    Eventually you can make the function FileExists Private

+ 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:Search through all ws / show results in Listbox
    By wali in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-22-2015, 09:56 PM
  2. [SOLVED] How to show data in UserForm ListBox from WorkSheet?
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-31-2014, 05:26 PM
  3. [SOLVED] Vlookup in UserForm - Get Input from listbox, Lookup in specific table from specific sheet
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2013, 09:00 AM
  4. Using Listbox selection to show specific labels and texboxes on userform
    By jlwiii34 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2013, 03:17 PM
  5. UserForm;Listbox Select Show Picture
    By samsara in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2009, 09:48 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