Mr Retirement
New Member
- Joined
- Nov 12, 2016
- Messages
- 46
I'm trying to loop through my sheets and when I get to the 8th sheet, it has this error:
"Run-time error '1004': Select method of Worksheet class failed."
Anyone see my mistake? It works great through the first 7 sheets, not sure why it wont continue.
My Code is:
Thanks!
"Run-time error '1004': Select method of Worksheet class failed."
Anyone see my mistake? It works great through the first 7 sheets, not sure why it wont continue.
My Code is:
Code:
Sub RefreshAllWorksheets()
Dim Count, i As Long
i = 1
Count = Sheets.Count
Do While i < Count
Sheets(i).Select
Sheets(i).Unprotect
Call HypMenuVRefresh
Sheets(i).Cells(1, 12).Select
ActiveCell.Interior.Color = RGB(255, 255, 255)
Sheets(i).Protect
i = i + 1
Loop
End Sub
Thanks!