PC Review


Reply
Thread Tools Rate Thread

Auto Start a Macro in Excel 2007 VBA

 
 
christopher ward
Guest
Posts: n/a
 
      16th Jul 2008
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      16th Jul 2008

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" <(E-Mail Removed)> wrote in
message news:489BE33A-BE4F-433E-AA8A-(E-Mail Removed)...
> 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 With Quote
 
Dylan
Guest
Posts: n/a
 
      16th Jul 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run auto-open macro in Excel 2007? jeh Microsoft Excel Programming 3 23rd Jan 2010 10:30 PM
Auto Start Macro in Excel ABC Seamless Wayne Microsoft Excel Programming 2 24th Jan 2008 08:26 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort =?Utf-8?B?R2F2aW4=?= Microsoft Excel Worksheet Functions 0 17th May 2007 01:20 PM
Excel 2007 - Print Macro with Auto Sort? =?Utf-8?B?R2F2aW4=?= Microsoft Excel Programming 0 17th May 2007 09:26 AM
Excel auto-start macro =?Utf-8?B?UkRDTEFSSw==?= Microsoft Excel Programming 3 5th Oct 2004 07:21 PM


Features
 

Advertising
 

Newsgroups
 


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