+ Reply to Thread
Results 1 to 5 of 5

code populates list boxes in active sheet, but does not populate boxes in subsequent sheet

  1. #1
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    code populates list boxes in active sheet, but does not populate boxes in subsequent sheet

    Hi, all,

    I have code that populates 3 combo boxes when the workbook is open. This works fine for the sheet that is active, but it is not populating the comboboxes in any other tab (I have identical tabs that I want to be able to navigate between).


    I believe this has something to do with the Private Sub workbook_open() option, but I don't know what I should change it to to make this work.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: code populates list boxes in active sheet, but does not populate boxes in subsequent s

    Your code only populates comboboxes on one worksheet and that's the ActiveSheet.

    If you want to populate other worksheets you'll need further code, for example a loop.
    Last edited by Norie; 08-13-2014 at 09:54 AM.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: code populates list boxes in active sheet, but does not populate boxes in subsequent s

    Thanks, Norie,

    The worksheets in this workbook are all identical, and so what I would like is to alter the above code so that it runs when the workbook is open, and also when another sheet is selected. This way, the comboboxes in each sheet are updated once that sheet is activated.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: code populates list boxes in active sheet, but does not populate boxes in subsequent s

    Why not populate all the comboboxes on all the sheets when the workbook opens?
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: code populates list boxes in active sheet, but does not populate boxes in subsequent s

    Norie, you are wise. This accomplishes the task. Thanks for the help!

+ 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. Active X text boxes on my sheet are being recognized as pictures?
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2014, 03:15 PM
  2. Replies: 3
    Last Post: 02-20-2013, 12:54 AM
  3. [SOLVED] Code for using prompt boxes within a sheet?
    By Bandicoot in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2012, 05:20 AM
  4. Check boxes to populate list in another sheet
    By biancam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2012, 08:38 AM
  5. Clearing check boxes in active sheet only
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2012, 12:13 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