View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
WhytheQ WhytheQ is offline
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 -