Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Auto Start a Macro in Excel 2007 VBA

Hi all experts -

I am using Excel 2007 VBA and have written a macro which i want to auto
start when Excel is started. I know this can be done but I cannot find the
option to do this. In good english could someone tell me where this is please
as I suspect it is just a setting in the properties panal or similar.

Thanks in advance if you help
--
C Ward
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Auto Start a Macro in Excel 2007 VBA


Private Sub Workbook_Open()
'your code here
End Sub

This is workbook event code.
Go into the VBIDE - ALt-F11
Select the VBAProject for your workbook
Make sure that the Microsoft Excel Objects list is expanded
Select Thisworkbookf rom the list
Paste the code in the code window.


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"christopher ward" wrote in
message ...
Hi all experts -

I am using Excel 2007 VBA and have written a macro which i want to auto
start when Excel is started. I know this can be done but I cannot find the
option to do this. In good english could someone tell me where this is
please
as I suspect it is just a setting in the properties panal or similar.

Thanks in advance if you help
--
C Ward



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Auto Start a Macro in Excel 2007 VBA

Creating a Worksheet OnOpen Event by double clicking the ThisWorkbook object
in Microsoft Excel Objects, then, selecting the =Open event from the right
hand dropdown, create a new Open event, then paste your macro code into it.

Regards
Dylan

"christopher ward" wrote:

Hi all experts -

I am using Excel 2007 VBA and have written a macro which i want to auto
start when Excel is started. I know this can be done but I cannot find the
option to do this. In good english could someone tell me where this is please
as I suspect it is just a setting in the properties panal or similar.

Thanks in advance if you help
--
C Ward

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
Auto-start macro Frank[_6_] Excel Discussion (Misc queries) 2 March 6th 10 06:06 PM
Auto Start Macro in Excel ABC Seamless Wayne[_2_] Excel Programming 2 January 24th 08 08:26 PM
Excel auto-start macro RDCLARK Excel Programming 3 October 5th 04 07:21 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 06:11 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"