ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Any ideas? (https://www.excelbanter.com/excel-programming/418439-any-ideas.html)

Solution4U

Any ideas?
 
The following code worked fine until I added checkboxes from the Control
Toolobox in cells from G3:O562:

Private Sub CommandButton1_Click()
' Start New Checklist Button

Sheets("sheet3").Range("a2:a21").Value = "FALSE"
Sheets("sheet3").Range("C2:C6").Value = "FALSE"
Sheets("Checklist").Rows("3:562").EntireRow.Hidden = True
Sheets("Checklist").Columns("g:o").EntireColumn.Hi dden = True
userform1.Hide
userform2.Show

End Sub

After adding the checkboxes, I get the following error:

Run-time error '-2147319765 (8002802b)':

Automation error
Element not found.

and the debugger takes me to this line:
Sheets("Checklist").Rows("3:562").EntireRow.Hidden = True

Anyone tell me what is going on and how to make this work?

Thanks for the assistance.

Solution4U

Any ideas?
 
Nevermind. The problem is too many checkboxes. I will post a new question.

"Solution4U" wrote:

The following code worked fine until I added checkboxes from the Control
Toolobox in cells from G3:O562:

Private Sub CommandButton1_Click()
' Start New Checklist Button

Sheets("sheet3").Range("a2:a21").Value = "FALSE"
Sheets("sheet3").Range("C2:C6").Value = "FALSE"
Sheets("Checklist").Rows("3:562").EntireRow.Hidden = True
Sheets("Checklist").Columns("g:o").EntireColumn.Hi dden = True
userform1.Hide
userform2.Show

End Sub

After adding the checkboxes, I get the following error:

Run-time error '-2147319765 (8002802b)':

Automation error
Element not found.

and the debugger takes me to this line:
Sheets("Checklist").Rows("3:562").EntireRow.Hidden = True

Anyone tell me what is going on and how to make this work?

Thanks for the assistance.



All times are GMT +1. The time now is 03:12 AM.

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