+ Reply to Thread
Results 1 to 8 of 8

Setting the Visible Property of a Worksheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Setting the Visible Property of a Worksheet

    Hi,

    I have seen this done, but can't work out how to do it myself.

    I want to set the "Visible" property of a worksheet to xlSheetHidden, and make it so that if a user tries to make it visible it won't allow it and comes up with a Message Box saying "Unable to set the Visible property of the Worksheet class"

    I have an old worksheet where a sheet is hidden and I can't display it, even by the Properties window. It comes up with the above error message. Being able to display it will help me work out how to hide it.

    Thanks, Paul.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Setting the Visible Property of a Worksheet

    Hello
    After making the sheet hidden by changing the property to 'xlSheetHidden' ..
    In the Review tab >> 'Protect Workbook' >> Put a password .. Save the file
    Now if you tried to make it visible you will receive the message "Unable to set the Visible property of the Worksheet class"
    Hope this helps you
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Setting the Visible Property of a Worksheet

    Thanks for your reply.
    The sample worksheet I have is unlocked (both the worksheet and VB).
    But I still can't change the worksheet Visible property to xlvisible. It comes up with the error. Is there somewhere else it could be locked?

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Setting the Visible Property of a Worksheet

    Can you attach your file?

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Setting the Visible Property of a Worksheet

    Unfortunately, I can't. While it's an old (obsolete) file, it's classified and cannot be distributed.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Setting the Visible Property of a Worksheet

    Try to unprotect the workbook from the "Review" tab

  7. #7
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Setting the Visible Property of a Worksheet

    Okay, I inspected the code. "Protect" commands (with password) were against almost every function the worksheet does (probably 50 or so commands). I removed them all and I can now change the Visible property.

    Thanks for your help.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Setting the Visible Property of a Worksheet

    You're welcome. Glad I can help you
    Regards

+ 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. Error: Unable to set a Visible Property of a Worksheet Class.
    By LgAo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2014, 04:59 AM
  2. Replies: 1
    Last Post: 12-17-2012, 01:24 PM
  3. Setting the Visible Property of Pivot Items
    By nooders in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2010, 12:12 PM
  4. Unable to set the visible property of the worksheet class
    By colinnwn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-09-2009, 03:48 PM
  5. Trouble setting visible property for PivotItems
    By ridawg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2006, 10:10 AM
  6. setting visible (ie displayed) part of the worksheet
    By gvm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2005, 09:10 PM
  7. Runtime error 1004 - unable to set Visible property of Worksheet c
    By SueJB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2005, 10:05 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