+ Reply to Thread
Results 1 to 2 of 2

run time error 1004 unable to set the visible property of the worksheet class - help! :)

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    64

    run time error 1004 unable to set the visible property of the worksheet class - help! :)

    Hello everybody

    I've done some research on the 'net this afternoon and despite finding a number of pages pointing to my problem I haven't found any solutions, so I'm wondering if this is even possible!

    I have a workbook that is password protected for commercially sensitive reasons. On one sheet is a button that toggles between hiding and unhiding another sheet of data. When the workbook is password protected and a user tries to unhide the sheet in question, the 'Run time error 1004...' messages appears and I understand from my research that this because of the protection. The problem is I need to be able to do both (FYI as a workaround I've amended the VBA to make the sheet very hidden and then disabled the password protection, but I'm not happy doing this as it leaves the workbook exposed).

    The question is therefore as follows...is it possible to have a piece of VBA code that enables hiding/unhiding sheets while the workbook is protected (effectively when the code is executed it 'ignores' or 'overrides' the protection)?

    Any help is appreciated

    Thank you
    Kenny

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

    Re: run time error 1004 unable to set the visible property of the worksheet class - help!

    Why not have code that unprotects, hides/unhides and then protects?
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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