#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Auto Run Macro

Excel 2003 - I have this macro, but it doesn't run when I open the workbook:

Private Sub Workbook_Open()
Application.CommandBars("Cool Macros").Visible = True
End Sub

I can run the macro manually AFTER opening the workbook, but I want it to
run automatically. My ultimate goal is to install the "Cool Macros" toolbar
for ANYONE who opens this workbook. Any idea what I'm doing wrong.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Auto Run Macro

Never mind; I figured it out. It should be Auto_Open() instead.

"Dorci" wrote:

Excel 2003 - I have this macro, but it doesn't run when I open the workbook:

Private Sub Workbook_Open()
Application.CommandBars("Cool Macros").Visible = True
End Sub

I can run the macro manually AFTER opening the workbook, but I want it to
run automatically. My ultimate goal is to install the "Cool Macros" toolbar
for ANYONE who opens this workbook. Any idea what I'm doing wrong.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Auto Run Macro

It will work as either Workbook_Open or Auto_Open

Depends upon where you store the code.

Workbook_Open goes into Thisworkbook module.

Auto_Open goes into a general module.


Gord Dibben MS Excel MVP

On Thu, 5 Feb 2009 14:33:47 -0800, Dorci
wrote:

Never mind; I figured it out. It should be Auto_Open() instead.

"Dorci" wrote:

Excel 2003 - I have this macro, but it doesn't run when I open the workbook:

Private Sub Workbook_Open()
Application.CommandBars("Cool Macros").Visible = True
End Sub

I can run the macro manually AFTER opening the workbook, but I want it to
run automatically. My ultimate goal is to install the "Cool Macros" toolbar
for ANYONE who opens this workbook. Any idea what I'm doing wrong.

Thanks in advance.


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
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro - Auto Run Gary Excel Worksheet Functions 1 May 12th 06 08:29 PM
macro for auto sum ahemani New Users to Excel 2 July 29th 05 12:53 AM
Auto Run a Macro Pam Coleman Excel Discussion (Misc queries) 2 May 3rd 05 02:58 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"