D
Daniel Bonallack
My workbook has approximately 100 worksheets, and about 30
of these have charts. I would like to loop through the
sheets, and make sure that cell A1 is selected.
Sub SelectA1
For i = 1 to Sheets.count
Sheets(i).visible = True
Sheets(i).select
cells(1,1).select
Next i
End Sub
The problem is, sometimes a chart is selected, and so I
get an error if I try to select cell A1.
Can anyone improve my loop to handle the cases when a
chart is selected?
Thanks in advance
Daniel Bonallack
of these have charts. I would like to loop through the
sheets, and make sure that cell A1 is selected.
Sub SelectA1
For i = 1 to Sheets.count
Sheets(i).visible = True
Sheets(i).select
cells(1,1).select
Next i
End Sub
The problem is, sometimes a chart is selected, and so I
get an error if I try to select cell A1.
Can anyone improve my loop to handle the cases when a
chart is selected?
Thanks in advance
Daniel Bonallack