View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Run Macro for all worksheets

You can have another macro that calls your macro:

Option Explicit
Sub RunAll()
dim wks as worksheet
for each wks in activeworkbook.worksheets
wks.select
call yourmacronamehere
next wks
end sub

"saman110 via OfficeKB.com" wrote:

Hello All,

I have many worksheets and I have a macro that I want to run for each
worksheet. Is there any way I could save my fingers some pain instead of
going throw all worksheets and run the macro could run the macro for all
worksheets at once.

Thanks.

--
Message posted via http://www.officekb.com


--

Dave Peterson