Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I really need help with a rule | Excel Worksheet Functions | |||
If/Then Rule | Excel Discussion (Misc queries) | |||
Validation Rule | New Users to Excel | |||
validation rule | Excel Worksheet Functions | |||
CountIfBlank Rule | Excel Programming |