+ Reply to Thread
Results 1 to 8 of 8

Populate ListBox From VeryHidden Sheet

  1. #1
    Registered User
    Join Date
    04-13-2020
    Location
    Ottawa, Ontario
    MS-Off Ver
    Latest (Version 2003)
    Posts
    7

    Arrow Populate ListBox From VeryHidden Sheet

    Hello, I need urgent help on this. I want to populate a listbox from an xlVeryHidden sheet. I looked online and found a few threads but could not get it to work with the way I've written the code. I've been trying for 2 days. Thanks!

    Please Login or Register  to view this content.
    Last edited by AliGW; 04-14-2020 at 02:06 AM. Reason: Irrelevant section of title removed.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Qualify the sheet for the range of cells.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    04-13-2020
    Location
    Ottawa, Ontario
    MS-Off Ver
    Latest (Version 2003)
    Posts
    7

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Quote Originally Posted by AlphaFrog View Post
    Qualify the sheet for the range of cells.

    Please Login or Register  to view this content.
    Thanks for the reply, I'm not sure what you meant by this. Set wkse = Sheets("Employee_List") - i already qualified the sheet. The code is working perfectly fine when the sheet is not xlVeryHidden, it only stops working when it's hidden or very hidden.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Did you try my suggestion?

    This doesn't qualify a cell reference. Set wkse = Sheets("Employee_List"). It sets a variable.

    The line below will work if Employee_List is the active sheet because the Cells reference is not qualified and it will reference the Active Sheet by default.
    Please Login or Register  to view this content.
    If Employee_List is hidden, it cannot be the Active sheet. So if you qualify the Cells reference as I previously suggested, it will reference the hidden Employee_List instead of the Active sheet.
    Last edited by AlphaFrog; 04-14-2020 at 01:47 AM.

  5. #5
    Registered User
    Join Date
    04-13-2020
    Location
    Ottawa, Ontario
    MS-Off Ver
    Latest (Version 2003)
    Posts
    7

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Quote Originally Posted by AlphaFrog View Post
    Did you try my suggestion?

    This doesn't qualify a cell reference. Set wkse = Sheets("Employee_List"). It sets a variable.

    The line below will work if Employee_List is the active sheet because the Cells reference is not qualified and it will reference the Active Sheet by default.
    Please Login or Register  to view this content.
    If Employee_List is hidden, it cannot be the Active sheet. So if you qualify the Cells reference as I previously suggested, it will reference the hidden Employee_List instead of the Active sheet.
    In the second code you quoted the only difference I see is the removal of wkse. I tried this and nothing changed. I'm not sure what you mean by qualifying cell reference. How do I do that? Thanks!

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Is "Employee_List" the hidden sheet?

    Did you try this and did it work?
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-13-2020
    Location
    Ottawa, Ontario
    MS-Off Ver
    Latest (Version 2003)
    Posts
    7

    Re: URGENT - Populate ListBox From VeryHidden Sheet

    Quote Originally Posted by AlphaFrog View Post
    Is "Employee_List" the hidden sheet?

    Did you try this and did it work?
    Please Login or Register  to view this content.
    Oh god my bad!!! It's 2AM here I thought you put the wkse after lastrow! Thank you very much, such a simple fix!!! I really need to learn vba better and stop my trial and error style :P

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Populate ListBox From VeryHidden Sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Please don't mark threads as urgent in future - the help you get here is for free and provided by unpaid volunteers in their free time, so don't try to have your queries prioritised - just be patient and wait your turn.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Populate listbox from not adjacent range of cells in another sheet
    By Alex Piotto in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 04-08-2018, 02:03 AM
  2. [SOLVED] Shortcut to view veryhidden sheet
    By dsharman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2017, 03:18 PM
  3. Populate (ca 200) Txtboxes depending on listbox selection, live-filter for listbox &1 more
    By InternInNeed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2016, 09:56 AM
  4. trying to populate a listbox with rows from sheet then when selected split into textbox
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2015, 06:45 AM
  5. [SOLVED] How do I populate a listbox with a list excluding values found in another listbox?
    By Hokiefan00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2014, 01:47 PM
  6. veryhidden sheet make restrictions ?!
    By Marie J-son in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2005, 01:06 AM
  7. [SOLVED] Sheet hidden and VeryHidden
    By Marc in forum Excel General
    Replies: 7
    Last Post: 03-28-2005, 08:06 PM

Tags for this Thread

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