Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default One macro to rule them all


New here, I've searched and researched, but have been unable to find th
answer to my question...so here goes: (I hope this isn't such a dum
question that no one wants to bother with it!)

I have a series of macros I've recorded in a workbook, and now I wan
to create a macro to run them all in sequence, and then create
template that I can use anytime I get new data. I want to just impor
the new data into my newly created document, and run the One Macro tha
Rules them All, instead of having to run all 8 of them individually.
am totally new to recording macros and I just was unable to d
everything in one great big macro.

I have tried to record the macro, and it works fine in the workbook
but when I create a template from it and then create a new document of
the template, I get the error message: runtime error 1004 - it seems t
be looking for my macro in the template- which of course isn't opened
The macro DOES work in the newly created document if I open th
template too, but I would like to be able to avoid that if possible.
I've tried putting the macro in a Personal Macro Workbook but tha
didn't work either.

One more thing, is there a way to have the macro run but not be able t
see everything that it's doing? Makes me dizzy! :)

Thanks for you help

--
gerbilsp
-----------------------------------------------------------------------
gerbilspy's Profile: http://www.excelforum.com/member.php...fo&userid=2804
View this thread: http://www.excelforum.com/showthread.php?threadid=47552

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default One macro to rule them all

I hope i understand your problem.
Perhaps i have some of the answer.

If your macro starts as private sub xxxx()
Write public insted of private.
Move all the macros in a module pad in macro editor.
Rename the module to known name in properties wondow.
Then copy all your macros to the module with your private name.

Then you are able to export the module file to other workbooks.

Theis is just one way, there ar others to.
Best regards
Øyvind
--
Øyvind


"gerbilspy" wrote:


New here, I've searched and researched, but have been unable to find the
answer to my question...so here goes: (I hope this isn't such a dumb
question that no one wants to bother with it!)

I have a series of macros I've recorded in a workbook, and now I want
to create a macro to run them all in sequence, and then create a
template that I can use anytime I get new data. I want to just import
the new data into my newly created document, and run the One Macro that
Rules them All, instead of having to run all 8 of them individually. I
am totally new to recording macros and I just was unable to do
everything in one great big macro.

I have tried to record the macro, and it works fine in the workbook,
but when I create a template from it and then create a new document off
the template, I get the error message: runtime error 1004 - it seems to
be looking for my macro in the template- which of course isn't opened.
The macro DOES work in the newly created document if I open the
template too, but I would like to be able to avoid that if possible.
I've tried putting the macro in a Personal Macro Workbook but that
didn't work either.

One more thing, is there a way to have the macro run but not be able to
see everything that it's doing? Makes me dizzy! :)

Thanks for you help!


--
gerbilspy
------------------------------------------------------------------------
gerbilspy's Profile: http://www.excelforum.com/member.php...o&userid=28047
View this thread: http://www.excelforum.com/showthread...hreadid=475520


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default One macro to rule them all

To run without seeing it run:

Appication.DisplayAlerts = false
You don't have to set it back to true if the macro completes before giving
control back to user, it is automatic.

HTH.

Bill Benson
http://www.vbacreations.com

"gerbilspy" wrote
in message ...

New here, I've searched and researched, but have been unable to find the
answer to my question...so here goes: (I hope this isn't such a dumb
question that no one wants to bother with it!)

I have a series of macros I've recorded in a workbook, and now I want
to create a macro to run them all in sequence, and then create a
template that I can use anytime I get new data. I want to just import
the new data into my newly created document, and run the One Macro that
Rules them All, instead of having to run all 8 of them individually. I
am totally new to recording macros and I just was unable to do
everything in one great big macro.

I have tried to record the macro, and it works fine in the workbook,
but when I create a template from it and then create a new document off
the template, I get the error message: runtime error 1004 - it seems to
be looking for my macro in the template- which of course isn't opened.
The macro DOES work in the newly created document if I open the
template too, but I would like to be able to avoid that if possible.
I've tried putting the macro in a Personal Macro Workbook but that
didn't work either.

One more thing, is there a way to have the macro run but not be able to
see everything that it's doing? Makes me dizzy! :)

Thanks for you help!


--
gerbilspy
------------------------------------------------------------------------
gerbilspy's Profile:
http://www.excelforum.com/member.php...o&userid=28047
View this thread: http://www.excelforum.com/showthread...hreadid=475520



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default One macro to rule them all

Put all the recorded macros you want to run in the Personal Macro Workbook in
one module. Then write a procedure to call the macros in the order you want
them.
Sub Main()
Call Macro1
Call Macro2
Call Macro3
End Sub

For you case of dizzy spells you can add the the begining of your Macros
"Application.ScreenUpdating = False" and "Application.ScreenUpdating = True"
at the end of your macro. BUT...test this first on each Macro. Your macro
may need of update in the middle to continue running.

--
Mike Q.


"gerbilspy" wrote:


New here, I've searched and researched, but have been unable to find the
answer to my question...so here goes: (I hope this isn't such a dumb
question that no one wants to bother with it!)

I have a series of macros I've recorded in a workbook, and now I want
to create a macro to run them all in sequence, and then create a
template that I can use anytime I get new data. I want to just import
the new data into my newly created document, and run the One Macro that
Rules them All, instead of having to run all 8 of them individually. I
am totally new to recording macros and I just was unable to do
everything in one great big macro.

I have tried to record the macro, and it works fine in the workbook,
but when I create a template from it and then create a new document off
the template, I get the error message: runtime error 1004 - it seems to
be looking for my macro in the template- which of course isn't opened.
The macro DOES work in the newly created document if I open the
template too, but I would like to be able to avoid that if possible.
I've tried putting the macro in a Personal Macro Workbook but that
didn't work either.

One more thing, is there a way to have the macro run but not be able to
see everything that it's doing? Makes me dizzy! :)

Thanks for you help!


--
gerbilspy
------------------------------------------------------------------------
gerbilspy's Profile: http://www.excelforum.com/member.php...o&userid=28047
View this thread: http://www.excelforum.com/showthread...hreadid=475520


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default One macro to rule them all


Thank you all so much for the help, I will try your suggestions tomorro
when I get back to that project. I'll let you know how it turns out! :

--
gerbilsp
-----------------------------------------------------------------------
gerbilspy's Profile: http://www.excelforum.com/member.php...fo&userid=2804
View this thread: http://www.excelforum.com/showthread.php?threadid=47552

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
I really need help with a rule TORIA28 Excel Worksheet Functions 4 March 9th 09 01:22 PM
If/Then Rule Honorbar Excel Discussion (Misc queries) 2 January 26th 09 05:17 PM
Validation Rule aubrey New Users to Excel 0 October 28th 08 07:12 PM
validation rule andrewm Excel Worksheet Functions 7 June 23rd 05 06:45 AM
CountIfBlank Rule KAnoe Excel Programming 3 October 24th 04 07:41 PM


All times are GMT +1. The time now is 08:57 PM.

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

About Us

"It's about Microsoft Excel"