+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Hide/unhide rows with macro on a protected sheet

  1. #1
    Registered User
    Join Date
    08-19-2011
    Location
    Glen Burnie, MD
    MS-Off Ver
    Excel 2003
    Posts
    1

    Hide/unhide rows with macro on a protected sheet

    I have an Excel (2007) file that has a macro to hide/unhide rows based on a click event in a check box.

    When I protect the sheet, the macro does not work.

    I am using the following code:

    Private Sub CheckBox8_Click()
    If CheckBox8.Value = False Then
    Rows("29:32").Hidden = True
    Else
    Rows("29:32").Hidden = False
    End If
    End Sub

    Is there a way I can protect the sheet and allow the macro to work?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,360

    Re: Hide/unhide rows with macro on a protected sheet

    Please take a moment to read the forum rules and enclose your code sample in CODE tags.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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