+ Reply to Thread
Results 1 to 4 of 4

Refreshing combobox list

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Sheffield, UK
    MS-Off Ver
    2013
    Posts
    4

    Refreshing combobox list

    Hi,
    I have a form with a pair of combo boxes.* The first lists subfolders within a set location (Folder1 is the root, Folder2 contains the subfolders needed to be listed.* The second combo box lists the files contained within the subfolder selected in the first combo box.* I have a command button that opens the selected file, or if no file is selected, opens the folder in windows explorer.
    If the user adds a file or subfolder to the directory when the macro is already running, the new information doesn't show up in the combo box list.* The user has to close and reopen the macro to view the new information.*
    I want to add a command button to force a refresh of the data in the combo boxes but can't figure out how.* I'd appreciate any suggestions anyone might have.
    Please see the below code:

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Refreshing combobox list

    At the point the new file should be added to the list you can add into the code to call UserForm_Initialize which will relist the details in that combobox.
    Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back

    Please also mark your thread as solved once it has been.

  3. #3
    Registered User
    Join Date
    09-03-2014
    Location
    Sheffield, UK
    MS-Off Ver
    2013
    Posts
    4

    Re: Refreshing combobox list

    Quote Originally Posted by PFDave View Post
    At the point the new file should be added to the list you can add into the code to call UserForm_Initialize which will relist the details in that combobox.
    D'oh of course. Typical me looking for a complicated solution when the simplest is staring me right in the face! Thanks.

  4. #4
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Refreshing combobox list

    Quote Originally Posted by bacardi84uk View Post
    D'oh of course. Typical me looking for a complicated solution when the simplest is staring me right in the face! Thanks.
    Don't worry about it, we all do it. Sometimes a fresh pair of eyes does the trick.

    Thanks for the rep

+ 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] Userform: Change Combobox list based on a second ComboBox selection
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-11-2016, 03:45 PM
  2. [SOLVED] Refreshing a userform on Combobox selection
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2016, 06:08 PM
  3. [SOLVED] Change next ComboBox list based on previous ComboBox selection
    By SteveTheFish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2015, 11:23 PM
  4. Making a FormControl ComboBox's list depend on the value of another ComboBox's Reference
    By dpsciarrino in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2013, 11:52 PM
  5. [SOLVED] Make combobox list options dependant on selection in another combobox within a userform
    By Vladimir_Dobvchenko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:30 AM
  6. Auto-refreshing combobox list when user is entering letters
    By DanielTu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2013, 08:45 PM
  7. refreshing ComboBox values
    By viewmaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2006, 09:07 PM

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