I am just getting started with VBA.
I have a workbook containing many numbered sheets (1,2,3,4 etc).
I now have read that Qualifying a Worksheet as per below:
I wouldn't use a number as a variable name. You can loop through the worksheets collection in two ways - the first is marginally more efficient I believe but doubt you'll notice the difference.
As you say there is rarely any need to actually activate a sheet.
Sub x()
Dim ws As Worksheet, i As Long
'option 1
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Range("A1") = 1 'no need to activate first
Next ws
'option 2
For i = 1 To ActiveWorkbook.Worksheets.Count
Worksheets(i).Activate
Next i
End Sub