View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default macro for all open worksheets?

Something like the following will do what you want. I named your macro
"YourMacro". The code can be written to run faster but that would involve
making changes in your macro and you didn't post your macro. Note that this
code will run your macro on every sheet in your workbook. No exceptions.
You would have to add some exclusionary code if you want it to skip some of
the sheets. HTH Otto



Sub NewMacroName()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets

ws.Select
Call YourMacro
Next ws
End Sub
"barkiny" wrote in
message ...

i have 1500 worksheets all the same format
i have recorded a macro for workbook 1
i want to run the macro the other 1499 sheets

is there a quick way to run the macro without pressing run macro key
and select the macro and..............., (like grouping worksheets) ?


--
barkiny
------------------------------------------------------------------------
barkiny's Profile:
http://www.excelforum.com/member.php...o&userid=20397
View this thread: http://www.excelforum.com/showthread...hreadid=490136