+ Reply to Thread
Results 1 to 6 of 6

Selection of Worksheets on a UserForm ComboBox.

  1. #1
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Selection of Worksheets on a UserForm ComboBox.

    Hi Everyone,

    I hope you are all well.

    I have a workbook with 14 sheets, twelve of them are the full months of a year, the other two are protected and hidden sheets.

    I have the following code that populates all sheets in a combobox:
    Please Login or Register  to view this content.
    What I need is to populate on the ComboBox (lstSheets) all sheets but the two I have protected and hidden. The sheets names are: "Database" and "Codes".

    I've tried few codes, even with IF statement but cannot have it to work properly.

    Any ideas will be highly appreciated.

    Best regards,
    Filipe

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Selection of Worksheets on a UserForm ComboBox.

    Try
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Selection of Worksheets on a UserForm ComboBox.

    Thanks a million Mike,

    One is Hidden but the other one is not and I need to have them both clear from the list in the combobox.

    I've tried the following code but I can only managed to clear one:
    Please Login or Register  to view this content.
    How can I set more that one sheet?

    Thanks a million in advance.

    BR,
    Filipe

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Selection of Worksheets on a UserForm ComboBox.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Selection of Worksheets on a UserForm ComboBox.

    Sorry guys,

    I have founded the code I had missing:
    Please Login or Register  to view this content.
    Although, thanks Mike for your help as well so I know now how to not include hidden sheets.

    Much appreciated.
    Filipe

  6. #6
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Selection of Worksheets on a UserForm ComboBox.

    Sorry guys,

    I have founded the code I had missing:
    Please Login or Register  to view this content.
    Although, thanks Mike for your help as well so I know now how to not include hidden sheets.

    Much appreciated.
    Filipe

+ 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 Combobox to populate based on selection in another combobox
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 03:34 PM
  2. [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
  3. [SOLVED] UserForm , ComboBox 2 , refer to selection in Combo Box 1
    By waihar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 01:40 AM
  4. Validating userform combobox selection with vba and getting an error
    By drew.j.harrison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 11:27 AM
  5. userform combobox fills from selection on sheet
    By mdshotgun in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-28-2011, 05:45 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