PC Review


Reply
Thread Tools Rate Thread

Auto-execute an Excel macro upon opening .xls file

 
 
Paul_B
Guest
Posts: n/a
 
      5th Dec 2006
Ok, now that I've got my default template set, with a macro
module, I'm trying to set a macro to auto-fire upon opening.
Here's the macro:

/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
| Sub Workbook_Open()
|
| Application.Caption = "excel"
|
| End Sub
\_______________________________


It shortens the Title bar text for the sake of the Taskbar icons.

I read in the archives that I should put 'Private ' before the
'Sub' in the macro, but that doesn't do anything either. It works
if I fire it by hand, but I'd like to automate it.

Thanks,
p.
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      5th Dec 2006
Works for me with or without the Private

Note.........Workbook_Open code must go into the Thisworkbook module, not a
general module.

To run from a general module you must rename to

Sub Auto_Open()
Application.Caption = "excel"
End Sub



Gord Dibben MS Excel MVP

On Tue, 5 Dec 2006 18:18:21 -0500, Paul_B <pb_public-(E-Mail Removed)>
wrote:

>Ok, now that I've got my default template set, with a macro
>module, I'm trying to set a macro to auto-fire upon opening.
>Here's the macro:
>
> /ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
>| Sub Workbook_Open()
>|
>| Application.Caption = "excel"
>|
>| End Sub
> \_______________________________
>
>
>It shortens the Title bar text for the sake of the Taskbar icons.
>
>I read in the archives that I should put 'Private ' before the
>'Sub' in the macro, but that doesn't do anything either. It works
>if I fire it by hand, but I'd like to automate it.
>
>Thanks,
>p.


 
Reply With Quote
 
Paul_B
Guest
Posts: n/a
 
      6th Dec 2006
On Tue, 05 Dec 2006 15:46:48 -0800, Gord Dibben wrote:

> Works for me with or without the Private
>
> Note.........Workbook_Open code must go into the Thisworkbook module, not a
> general module.
>
> To run from a general module you must rename to
>
> Sub Auto_Open()
> Application.Caption = "excel"
> End Sub
>
> Gord Dibben MS Excel MVP
>
> On Tue, 5 Dec 2006 18:18:21 -0500, Paul_B <pb_public-(E-Mail Removed)>
> wrote:
>
>>Ok, now that I've got my default template set, with a macro
>>module, I'm trying to set a macro to auto-fire upon opening.
>>Here's the macro:
>>
>> /ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
>>| Sub Workbook_Open()
>>|
>>| Application.Caption = "excel"
>>|
>>| End Sub
>> \_______________________________
>>
>>
>>It shortens the Title bar text for the sake of the Taskbar icons.
>>
>>I read in the archives that I should put 'Private ' before the
>>'Sub' in the macro, but that doesn't do anything either. It works
>>if I fire it by hand, but I'd like to automate it.
>>
>>Thanks,
>>p.



Wow, that was a piece of cake! Thanks so very much. And my
Taskbar thanks you as well!

Now to see about signing the macro so there's no nag screen.

p.
 
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
Re: Auto Execute Macro when opening a form Roger Carlson Microsoft Access VBA Modules 0 19th Mar 2009 04:46 PM
Re: Auto Execute Macro when opening a form Danny J. Lesandrini Microsoft Access VBA Modules 0 19th Mar 2009 04:21 PM
How to execute macro without Opening a word file? Satish Jadhav Microsoft Word Document Management 1 17th Nov 2008 11:53 AM
Execute macro at opening file =?Utf-8?B?Y2xpcHBhbg==?= Microsoft Excel New Users 1 26th Nov 2005 10:03 AM
Auto Execute Macros when opening and closing a file Amit Microsoft Excel Misc 2 26th Dec 2003 08:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 PM.