Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Looping several codes

Is there an easy way to have one macro that runs several. I have 11 different
sheets that all have a transfer data macro written, I would like to have one
button to force all of the code to run. Is there an easy way? Thansk in
advance for your help
--
Thank you for your time!
John
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Looping several codes

If the macro runs against the activesheet, then the simplest may be to just
select each sheet and call the macro:

Option Explicit
Sub RunThemAll()

Dim wks as worksheet
for each wks in activeworkbook.worksheets
wks.select
call yourmacronamehere
next wks

End sub

Very Basic User wrote:

Is there an easy way to have one macro that runs several. I have 11 different
sheets that all have a transfer data macro written, I would like to have one
button to force all of the code to run. Is there an easy way? Thansk in
advance for your help
--
Thank you for your time!
John


--

Dave Peterson
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
Looping Maggie[_6_] Excel Discussion (Misc queries) 6 October 2nd 08 10:14 PM
Not Looping Roger Excel Discussion (Misc queries) 0 February 26th 08 06:18 PM
Looping till value is 1? Jo[_2_] Excel Discussion (Misc queries) 2 October 3rd 07 10:14 PM
Looping David T Excel Discussion (Misc queries) 2 August 30th 06 11:51 PM
looping trouble Hru48 Excel Discussion (Misc queries) 5 May 12th 06 09:35 PM


All times are GMT +1. The time now is 12:25 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"