Running a one macro on all sheets within the file
In your workbook with the 100 sheets you would go to a general module
(Insert Module) and put in the code
Sub Run100()
Dim sh as Worksheet
for each sh in thisworkbook.Worksheets
sh.Activate
application.Run "MyAddinName.xla!MyMacroName"
Next
End sub
Then you would go to Excel and choose
Run100 in Tools=Macros=macro and hit the run button.
Obviously you would change "MyAddinName.xla!MyMacroName" to the name of
the addin and the name of the macro in that addin that you want to run.
--
Regards,
Tom Ogilvy
"Eron" wrote in message
oups.com...
Hi All,
I am using excel 2003.
I would like to know if anyone knows how to run one macro on all sheets
within the file.
Today I have a spread sheet with over 100 sheets. In order to receive
the my final outcome I need to run the same macro 100 times (in each
sheet). The macro I am using is an add in macro.
There must be a way i could run a macro that will do the job for me.
I would really appreciate if some one could give me an answer.
Eron
|