+ Reply to Thread
Results 1 to 5 of 5

VB code referencing a hidden worksheet error

  1. #1
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Iowa
    MS-Off Ver
    2007
    Posts
    212

    VB code referencing a hidden worksheet error

    Hello all once again,

    I continue to cause myself heartache due to lack of knowledge. I have an ongoing workbook that many of you have helped build and a new issue came up today. After hiding a few worksheets that hold reference data only, errors started happening when running user forms that use the data on those sheets. Took me awhile to figure out the "hiding" was the problem.

    So, my question is; is there a simple way of changing the syntax so that hidden sheets can still be referenced without the user having access to them? I know this is a quite generic question without sample code/worksheet but my guess is it's not that uncommon of an issue.

    Ideas and/or solutions.

    Thanks as always.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VB code referencing a hidden worksheet error

    What exactly are you referencing these hidden sheets to do?
    I often have hidden sheets to hold lengthy lists for populating combo boxes and don't recall coming up against issues with them being hidden.

    There are issues if you're trying to copy hidden sheets into new workbooks and probably other scenarios (that don't spring to mind at 6am!) but I think we'd need to know a little more about what your forms are trying to do with these hidden sheets in order to provide guidance.

    BSB

  3. #3
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Iowa
    MS-Off Ver
    2007
    Posts
    212

    Re: VB code referencing a hidden worksheet error

    The user form is to add new data to a worksheet database (this sheet is not hidden). Some of the combo boxes in the user form reference lists that reside on the hidden sheet to make input easier and consistent.

    I should probably copy the workbook and attach a cleaned up version to the thread, which would take some time. But I would like to know the "why" just for reference.

    It's 12PM here, my mind isn't all that clear either!

    Thanks

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VB code referencing a hidden worksheet error

    Difficult to give you "why" without seeing it in context I'm afraid.

    BSB

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VB code referencing a hidden worksheet error

    Aside from the copying issue already mentioned, the only obvious issue would be that you can't select or activate a hidden sheet.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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] #VALUE! error when referencing a range on another worksheet
    By kar1179 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2012, 02:26 AM
  2. Code to save current worksheet and hidden worksheet
    By fusion007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2011, 02:28 PM
  3. Hidden Worksheet code
    By incjourn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2011, 03:09 PM
  4. would this code find a worksheet that his hidden ?
    By spyrule in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2006, 10:56 PM
  5. [SOLVED] Cell Referencing Code Error?
    By MPS0525 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-17-2006, 11:45 AM
  6. Compile error in hidden module: NT Reg Code
    By Nicky Zee in forum Excel General
    Replies: 1
    Last Post: 06-20-2006, 02:30 AM
  7. [SOLVED] Code to access a hidden worksheet
    By sir Lancelot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2005, 11:20 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