Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rick Martin
 
Posts: n/a
Default How can I set up a Macro to automatically run when I open a speci.

How can I set up a Macro to automatically run when I open a specific Excel
file?
  #2   Report Post  
Nick Hodge
 
Posts: n/a
Default

Rick

Still supported. (In a standard module)

Sub Auto_Open()
'Code here
End Sub

Preferred (XL97 up), use the workbook_Open() event, thus

Private Sub Workbook_Open()
'Code goes here
End Sub

The latter will fire even if the workbook is open through code

For an explanation of different module types and how to implement, go to

http://www.nickhodge.co.uk/vba/vbaimplement.htm

BTW, where are you posting from, I'm very interested as we seem to have a
huge number of posts recently that have had the subject line truncated? It
looks like the web interface to the newsgroups at Microsoft, but if you
could send the URL it would be great

Thanks

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Rick Martin" <Rick
wrote in message
...
How can I set up a Macro to automatically run when I open a specific Excel
file?



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
Can excel automatically number itself each time you open a documen Alesha Excel Discussion (Misc queries) 1 January 11th 05 08:40 PM
Automatically launch a macro when a fil is opened One-Leg Excel Discussion (Misc queries) 1 December 15th 04 09:12 PM
Open Word Doc From Excel Macro MATT Excel Discussion (Misc queries) 4 December 14th 04 01:09 AM
How do I get my personal macro worksheet to open whenever I open . Claudia_R Excel Discussion (Misc queries) 3 December 10th 04 12:59 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 05:46 PM


All times are GMT +1. The time now is 10:14 AM.

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"