ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto Run Macro (https://www.excelbanter.com/excel-discussion-misc-queries/219342-auto-run-macro.html)

Dorci

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.

Dorci

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.


Gord Dibben

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.




All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com