View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Through a command button hiding rows

Private Sub CheckBox1_Click()
Worksheets("Sheet1").Rows("13:22").hidden = True
End Sub

HTH
--
AP

"Saz" a écrit dans le
message de news: ...

Help!
I am creating a workbook where in worksheet1 there is a checklist.
Ideally when a topic's checkbox is clicked, a macro (which I have
assigned) will hide certain rows on worksheet2.
However I cannot get the action to reverse when the box is unchecked.
This is really frustrating me as I have tried to write a program using
boolean instead of the macro for when the button is "clicked" and then
clicked again, but I am not getting anywhere.

If it helps the rows I have also grouped into arrays.

Below is like my 20th attempt

Private Sub CheckBox1_Click()
Sheets("Sheet1").Select
i = Rows("13:22")
i.Select
Selection.EntireRow.Hidden = True
Sheets("Sheet2").Select

End Sub;)


--
Saz
------------------------------------------------------------------------
Saz's Profile:
http://www.excelforum.com/member.php...o&userid=17226
View this thread: http://www.excelforum.com/showthread...hreadid=549468