+ Reply to Thread
Results 1 to 12 of 12

My macros wont work when I protect my worksheet

  1. #1
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    My macros wont work when I protect my worksheet

    I have the follwing macro that is used to hide certain rows:

    Please Login or Register  to view this content.
    When I password protect my worksheet I am getting the following error; "Run-time error '1004' Unable to set the hidden property of the Range class"

    I have the same password for all the worksheets in this workbook. Please help me with this. I would like to be able to protect the worksheet and still have my macros work.

    Thanks
    Last edited by MGK086; 09-14-2009 at 03:43 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: My macros wont work when I protect my worksheet

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: My macros wont work when I protect my worksheet

    I think I added quote tags I hope that helps!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: My macros wont work when I protect my worksheet

    You did, but they need to be CODE tags.

  5. #5
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: My macros wont work when I protect my worksheet

    I meant code tags, either way we are on the same page

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: My macros wont work when I protect my worksheet

    You're wasting time that people could otherwise spend assisting you.

    You have QUOTE tags.

    You need CODE tags.

  7. #7
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: My macros wont work when I protect my worksheet

    You used Quote tags, not Code tags. There is a difference.

    Macro Code To Run Macros On Protected Worksheets & Sheets

  8. #8
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: My macros wont work when I protect my worksheet

    hope I got it right this time

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: My macros wont work when I protect my worksheet

    Thanks. Please see Palmetto's response.

  10. #10
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: My macros wont work when I protect my worksheet

    I also googled the problem and found that website. Unfortunately I'm very inexperienced with macros and can't figure out how to make that code work with my existing macro.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: My macros wont work when I protect my worksheet

    Try adding this line just after the line indicated:

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    07-22-2009
    Location
    Clio
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: My macros wont work when I protect my worksheet

    It works great! Thanks for the help!

+ 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