+ Reply to Thread
Results 1 to 5 of 5

Trouble unhiding a password protected worksheet in excel 2010 vba

  1. #1
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Trouble unhiding a password protected worksheet in excel 2010 vba

    Hi Everyone -
    I have a Workbook with several Hidden Worksheets. All of the Worksheets are password protected.

    Problem - I want to copy data from a visible worksheet to a hidden worksheet. I am using the following code:

    Please Login or Register  to view this content.
    I get Run-time Error 1004 - Unable to set the Visible Proerty of the Worksheet

    Any help is greatly appreciated

    Jim
    Last edited by stubbsj; 05-16-2012 at 08:20 AM. Reason: left something out

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Trouble unhiding a password protected worksheet in excel 2010 vba

    You can shorten this quite a bit:

    Please Login or Register  to view this content.
    The sheet doesn't actually have to be visible to copy data to it. You don't really need to assign the range, but that does help reduce maintenance inconsistencies if you change it.

  3. #3
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Trouble unhiding a password protected worksheet in excel 2010 vba

    Thanks Wallyeye

    That seemes to work but blow up when I execute the rest of my code

    Please Login or Register  to view this content.
    Last edited by stubbsj; 05-16-2012 at 08:19 AM. Reason: use code tags

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Trouble unhiding a password protected worksheet in excel 2010 vba

    you can't select an inactive sheet but you don't need to
    Please Login or Register  to view this content.
    will do the job of
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Trouble unhiding a password protected worksheet in excel 2010 vba

    Thanks to both JosephP and Wallyeye. Problem solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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