ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run time error (https://www.excelbanter.com/excel-programming/296182-run-time-error.html)

REGINALD BAST

run time error
 
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?



Don Guillett[_4_]

run time error
 
Go back to your original post and ask there.

--
Don Guillett
SalesAid Software

"REGINALD BAST" wrote in message
...
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?





Melanie Breden

run time error
 
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)



All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com