Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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
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
Auto adding a macro when Excel 2003 opens gigabyteconsulting Excel Discussion (Misc queries) 4 July 6th 09 08:57 PM
Conditional Formatting Not Immediately Refreshing after Macro Exec Dreiding Excel Programming 3 March 17th 07 09:43 AM
How to exec a commandbar button while cell in edit mode vj5 Excel Programming 1 July 4th 06 05:10 PM
How to exec a commandbar button while cell in edit mode [email protected] Excel Programming 1 July 4th 06 04:11 PM
Make Exec work properly (error messages on start and exit) TorG 8-(( Excel Discussion (Misc queries) 9 April 18th 06 01:10 PM


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