Auto-execute an Excel macro upon opening .xls file

P

Paul_B

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.
 
G

Gord Dibben

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
 
P

Paul_B

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


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.
 
Top