View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ronald Dodge[_2_] Ronald Dodge[_2_] is offline
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