Thank you. This works when I step through it, but I get a
run time error every time I click the togglebutton on the
sheet.
Unable to set hidden property of range class
Any ideas how to get around this?
do you work with Excel97?
Then activate the active selection before run the VBA Code:
Private Sub ToggleButton1_Click()
Selection.Activate
Rows.Hidden = False
If ToggleButton1.Value Then
Rows("1:4").Hidden = True
Rows("15:65536").Hidden = True
End If
End Sub
--
Regards
Melanie Breden
- Microsoft MVP für Excel -
http://excel.codebooks.de (Das Excel-VBA Codebook)