View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bwoods Bwoods is offline
external usenet poster
 
Posts: 8
Default run a macro for all sheets

That did the TRICK!!!! This will save me a ton of time!

"L. Howard Kittle" wrote:

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