You could put it in a loop like this:-
You don't say whether you're activating things (e.g. Range("A1").Select) or not so this code may not be appropriate. It's normally helpful if you post some or all of your code.
HTH,
D
Code:
Sub DoItToAllSheets()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
'Do something to the sheet
sht.Cells.Columns.AutoFit
Next
End Sub
You don't say whether you're activating things (e.g. Range("A1").Select) or not so this code may not be appropriate. It's normally helpful if you post some or all of your code.
HTH,
D