Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Copied a worksheet, now combobox is broke- what happened?

    I've got a spreadsheet (Excel 2003) that filters the entire year to a month selected by a combobox. I've had 2013's sheet working fine and copied it to a pair of new sheets for 2014 and 2015. After changing the VBA to the correct year, I find that the comboboxes will not update with any of the months. Can someone take a look and see what I'm obviously overlooking?

    Desk Schedule.xls

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    S.N.,

    Welcome to the Lounge as a new poster!

    In the This Workbook module you didn't update the Workbook_Open() routine for sheets 3 & 4.
    Code:
    Private Sub Workbook_Open()
        Sheet1.ComboBox1.List = Application.GetCustomListContents(4)
        Sheet2.ComboBox1.List = Application.GetCustomListContents(4)
        Sheet3.ComboBox1.List = Application.GetCustomListContents(4)
        Sheet4.ComboBox1.List = Application.GetCustomListContents(4)
    End Sub
    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. The Following User Says Thank You to RetiredGeek For This Useful Post:

    smileyninja (2013-11-20)

  4. #3
    New Lounger
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, that fixed it. Now, how come the 2013 worksheet worked without having to update it? My modules were always blank.

  5. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    S.N.,

    The standard modules were blank but the This Workbook module had the 1st 2 lines of code in it I just copied them and adjusted the sheet numbers at the beginning.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •