+ Reply to Thread
Results 1 to 4 of 4

Hidden Rows in a Protected Worksheet

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Toronto, ON
    MS-Off Ver
    MS Office 2010
    Posts
    55

    Hidden Rows in a Protected Worksheet

    Hi. I was able to create a macro that allows a user to unhide rows in a protected worksheet without unprotecting the other locked fields (see below). My question is: I want to add to this command so that 1 row can not be "unhidden" if the previous row is still hidden. For example, row 25 can not be unhidden if row 24 is still hidden. Any ideas?

    Thank you. Kat

    Macro command used:

    Private Sub Commandbutton4_Click()
    Sub Hide_Rows2h()
    ActiveSheet.Unprotect Password:="xxx"
    Rows("25").Hidden = Not Rows("25").Hidden
    ActiveSheet.Protect Password:="xxx"

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Hidden Rows in a Protected Worksheet

    Would this addition do the trick?
    Please Login or Register  to view this content.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Toronto, ON
    MS-Off Ver
    MS Office 2010
    Posts
    55

    Re: Hidden Rows in a Protected Worksheet

    Thank you!

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Hidden Rows in a Protected Worksheet

    Glad I could help.
    If it solves your problem, please mark this thread as solved (see Theread Tools).

+ 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. Keep hidden rows hidden, in a protected, filtered worksheet
    By djp630 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 10:22 PM
  2. protected sheets and hidden rows
    By BorisS in forum Excel General
    Replies: 1
    Last Post: 02-01-2006, 07:45 AM
  3. [SOLVED] Can specific cells on a worksheet be hidden & password protected?
    By Gord Dibben in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] Can specific cells on a worksheet be hidden & password protected?
    By Ann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. Can specific cells on a worksheet be hidden & password protected?
    By Ann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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