Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Load Macro at start up?

open the workbook. Go to the VBE (alt+F11), look in the project explorer for
your workbook, select the ThisWorkbook entry for your workbook. Double
click on it and it should open the ThisWorkbook Module. In the left
dropdown at the top of the module, select Workbook and from the right
dropdown select Open. At any point in this process you may see the
procedure declaration for the Workbook_Open event appear in the module.
(All steps will guarantee it).

Private Sub Workbook_Open()

End Sub

put your code in that Event or call you existing sub from that event.

If you want to learn what events are available, see Chip Pearson's site:

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

--
Regards,
Tom Ogilvy


"MJ Antoszkiw" wrote in message
...
How could I load a macro as soon as the workbook is opened?
Thanks.
MJ Antoszkiw.



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
MACRO TO LOAD AN ADDIN FARAZ QURESHI Excel Discussion (Misc queries) 2 May 8th 09 09:26 AM
Macro to Load Data from ver 1 to ver 2 [email protected] Excel Discussion (Misc queries) 2 August 24th 06 01:04 AM
Disabling an 'on load' macro Gizmo63 Excel Worksheet Functions 2 April 20th 06 12:51 PM
how do i load a dechex macro? and from where? Lumpy Excel Discussion (Misc queries) 2 April 2nd 06 03:12 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM


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