Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default startup macro does not execute

I created a macro named auto_run to run when I open a specific workbook. It
does not run upon opening the workbook but it does run when I go to Tools
macro run.
The instructions are
sheets ("consolidated") . select
range ("f11") . select
end sub

Macro security is set to low.
--
Artie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default startup macro does not execute

Did you put it in the ThisWorkbook module of that workbook?

In that module put it in:
Private Sub Workbook_Open()

RBS


"Artie" wrote in message
...
I created a macro named auto_run to run when I open a specific workbook.
It
does not run upon opening the workbook but it does run when I go to Tools
macro run.
The instructions are
sheets ("consolidated") . select
range ("f11") . select
end sub

Macro security is set to low.
--
Artie


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default startup macro does not execute

You neet to use the Workbook_Open event and put the macro in the ThisWorkbook
code module. Open the VBE, double click ThisWorkbook in the Project pane and
paste this in the code window. Save, close the workbook and re-open it.

Private Sub Workbook_Open()
Sheets ("consolidated") . select
Range ("f11") . select
End sub


"Artie" wrote:

I created a macro named auto_run to run when I open a specific workbook. It
does not run upon opening the workbook but it does run when I go to Tools
macro run.
The instructions are
sheets ("consolidated") . select
range ("f11") . select
end sub

Macro security is set to low.
--
Artie

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default startup macro does not execute

Name your macro

sub Auto_Open()
place in a REGULAR module

now in the ThisWorkook module add another macro

Private Sub Workbook_Open()
call Auto_open
End Sub

Now you have covered ALL contingencies.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Artie" wrote in message
...
I created a macro named auto_run to run when I open a specific workbook.
It
does not run upon opening the workbook but it does run when I go to Tools
macro run.
The instructions are
sheets ("consolidated") . select
range ("f11") . select
end sub

Macro security is set to low.
--
Artie


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
How to execute a macro automatically at startup of Excel? Radim Excel Programming 9 June 29th 06 11:55 AM
the macro don't execute robson soares Excel Programming 5 January 12th 06 06:57 PM
execute a macro Rossy Excel Programming 2 December 15th 05 09:04 AM
Execute Macro Yves Excel Discussion (Misc queries) 3 April 23rd 05 04:26 PM
Execute procedure on startup Richard[_20_] Excel Programming 4 March 3rd 04 11:36 AM


All times are GMT +1. The time now is 01:17 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"