Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel auto-start macro

How do you get a macro to automatically execute when you open a workbook?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Excel auto-start macro

Hi
tow ways:
1. Rename your macro to Auto_Open()
2. Put your code in the workbook_open() event

--
Regards
Frank Kabel
Frankfurt, Germany

"RDCLARK" schrieb im Newsbeitrag
...
How do you get a macro to automatically execute when you open a

workbook?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Excel auto-start macro

Hi
Assuming you've got XL97 or above, double click on the ThisWorkbook object
(for the workbook concerned) in VBE project window to create a module. In
the module window select Workbook and Open from the drop-down lists. The
following
code will automatically be generated:

Private Sub Workbook_Open()

End Sub

Insert the code you want and save.

Regards

Paul





"RDCLARK" wrote in message
...
How do you get a macro to automatically execute when you open a workbook?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel auto-start macro

Use the workbook_Open event

see Chip Pearson's page on events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"RDCLARK" wrote in message
...
How do you get a macro to automatically execute when you open a workbook?



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
Excel cannot auto start external application Jason Falzon[_2_] Excel Discussion (Misc queries) 0 March 25th 10 08:57 AM
Auto-start macro Frank[_6_] Excel Discussion (Misc queries) 2 March 6th 10 06:06 PM
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
how do I set up an auto start macro ForSale[_52_] Excel Programming 0 September 9th 04 10:42 PM
how do I set up an auto start macro Frank Kabel Excel Programming 0 September 9th 04 10:31 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"