Results 1 to 4 of 4

Hide rows AND checkboxes in that row with code/macro

Threaded View

Riqueza Hide rows AND checkboxes in... 08-23-2012, 05:11 AM
arlu1201 Re: Hide rows AND checkboxes... 08-23-2012, 05:23 AM
Riqueza Re: Hide rows AND checkboxes... 08-23-2012, 05:35 AM
arlu1201 Re: Hide rows AND checkboxes... 08-23-2012, 05:38 AM
  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Thumbs up Hide rows AND checkboxes in that row with code/macro

    Hi, I am so not a developer and everything code related I have learned online from forums like this so I hope someone can help me with this!

    Problem: I have a header row with a checkbox (CheckBox1) and if ticked then it should unhide rows 2 to 4 below and if unticked it should hide them again. The problem is that rows 2 to 4 all have a checkbox as well and when the rows get hidden the checkbox remains and I can't work out how to hide it too!

    Code I am currently using to hide rows:

    Sub HideUnhideCORE()
    
    Rows("2:4").Select
    If Selection.EntireRow.Hidden = False Then
    Selection.EntireRow.Hidden = True
    Else
    Selection.EntireRow.Hidden = False
    End If
    Range("$A$1").Select
    
    End Sub
    Can anyone help me amend this so it hides the checkboxes on row 2, 3 and 4 as well? Here's hoping! Thanks.
    Last edited by Riqueza; 08-23-2012 at 05:18 AM.

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