S
Stav19
Hi All
Fairly straightforward question I think, basically I want a little
macro to format a workbook I have open. It will select "A1" in each
sheet and then return to the first sheet. This is what I have:
Dim i As Integer
wksname = ActiveSheet.Name
For i = 1 To Sheets.Count
Sheets(i).Select
Range("A1").Select
Next i
'Sheets(wksname).Activate
unfortunately I get a "run time error 1004" message saying "Select
method of workclass failed".
Can anyone shed any light?
Cheers in advance
Fairly straightforward question I think, basically I want a little
macro to format a workbook I have open. It will select "A1" in each
sheet and then return to the first sheet. This is what I have:
Dim i As Integer
wksname = ActiveSheet.Name
For i = 1 To Sheets.Count
Sheets(i).Select
Range("A1").Select
Next i
'Sheets(wksname).Activate
unfortunately I get a "run time error 1004" message saying "Select
method of workclass failed".
Can anyone shed any light?
Cheers in advance