Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Run Macro for all worksheets

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Run Macro for all worksheets

Thank you.

saman110 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MACRO AND MULTIPLE WORKSHEETS Mel Excel Worksheet Functions 8 January 21st 07 02:53 PM
Same macro - Different Worksheets!? PaulW Excel Discussion (Misc queries) 2 December 12th 06 11:55 AM
Run A Macro On Selected Worksheets Carl Excel Worksheet Functions 2 August 31st 06 06:27 PM
macro to copy into different worksheets sarahphonics Excel Discussion (Misc queries) 2 June 30th 05 03:16 PM
Macro to Copy Worksheets JN Excel Worksheet Functions 0 April 17th 05 01:50 AM


All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"