View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default run a macro for all sheets

Here's a loop I got from Tom O. just yesterday

Sub CodeForEachSheet()
Dim WS_Count As Integer
Dim I As Integer

WS_Count = ActiveWorkbook.Worksheets.Count
Application.ScreenUpdating = False
For I = 1 To WS_Count
Worksheets(I).Activate

' Your code here

Next I
Worksheets(1).Activate
Application.ScreenUpdating = True
End Sub

HTH
Regard,
Howard

"Bwoods" wrote in message
...
I recorded a macro that i use to format a sheet. I would like to use this
same macro on multiple sheets without having to select each one and then
running the macro.

thanks in advance