Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Auto Exec macro?
Quite an interesting problem.
WorkbookA contains the main routine and consists of 4 sheets. When the routine is run sheet1 and sheet2 are copied and saved to a different drive and emailed to a recipient This is repeated several times. I'd like it so that when the recipients open the file an autoexec macro fires which simply does the following: Sub() Auto_Open Application.Calculation=xlAutomatic End sub Is there a way for me to attach this macro to each of the produced files without programming the VBE (i.e programmatically creating a module and adding in the above macro)? Any help greatly appreciated J |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Auto Exec macro?
Actually, the code would be in a standard module like:
Private Sub Auto_Open() Application.Calculation=xlAutomatic End sub However, unless you setup a file with this code in it already and to be used as a template file, you would have to mess with the VBE programming stuff. You could then save a copy of Sheet1 and Sheet2 into a copy of the template file, then save and mail that copy of the template file. -- Sincerely, Ronald R. Dodge, Jr. Master MOUS 2000 "WhytheQ" wrote in message ups.com... Quite an interesting problem. WorkbookA contains the main routine and consists of 4 sheets. When the routine is run sheet1 and sheet2 are copied and saved to a different drive and emailed to a recipient This is repeated several times. I'd like it so that when the recipients open the file an autoexec macro fires which simply does the following: Sub() Auto_Open Application.Calculation=xlAutomatic End sub Is there a way for me to attach this macro to each of the produced files without programming the VBE (i.e programmatically creating a module and adding in the above macro)? Any help greatly appreciated J |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Auto Exec macro?
Thanks Ronald - I'll give the template a go (although programming the
VBE might be fun as it isn't something I've tried before) J On 1 Aug, 13:06, "Ronald Dodge" wrote: Actually, the code would be in a standard module like: Private Sub Auto_Open() Application.Calculation=xlAutomatic End sub However, unless you setup a file with this code in it already and to be used as a template file, you would have to mess with the VBE programming stuff. You could then save a copy of Sheet1 and Sheet2 into a copy of the template file, then save and mail that copy of the template file. -- Sincerely, Ronald R. Dodge, Jr. Master MOUS 2000 "WhytheQ" wrote in message ups.com... Quite an interesting problem. WorkbookA contains the main routine and consists of 4 sheets. When the routine is run sheet1 and sheet2 are copied and saved to a different drive and emailed to a recipient This is repeated several times. I'd like it so that when the recipients open the file an autoexec macro fires which simply does the following: Sub() Auto_Open Application.Calculation=xlAutomatic End sub Is there a way for me to attach this macro to each of the produced files without programming the VBE (i.e programmatically creating a module and adding in the above macro)? Any help greatly appreciated J- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto adding a macro when Excel 2003 opens | Excel Discussion (Misc queries) | |||
Conditional Formatting Not Immediately Refreshing after Macro Exec | Excel Programming | |||
How to exec a commandbar button while cell in edit mode | Excel Programming | |||
How to exec a commandbar button while cell in edit mode | Excel Programming | |||
Make Exec work properly (error messages on start and exit) | Excel Discussion (Misc queries) |