Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Auto_Open vs. macro

Jim,

The Auto_Open won't run when a workbook is opened via code.
If you place your code in the Workbook_Open Event, that will
fire whenever the workbook opens either manually or via code.

You can "run" your Auto_Open macro with the following:
ActiveWorkbook.RunAutoMacros xlAutoOpen

Either way thjough, I believe the Workbook_Open event or calling
the Auto_Open will occur before the paste operation (which won't
do you any good).

A better choice would be to open the second workbook and manipulate
it via the coding in the first workbook (after the paste operation).

John

Jim Melchers wrote:

I am trying to have a macro copy data from 1 worksheet and
paste it into another and then want to automatically
execute a macro in the second which formats, prints, and
closes. Auto_Open doesn't seem to run after the paste
completes. The path to the second file is stored in a
cell in the first, can I use that somehow to establish a
reference to the macro in the second? Any other
suggestions?


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
Bypass Auto_open Macro in Excel 2007 BradJohnson Excel Discussion (Misc queries) 3 April 9th 09 05:28 PM
Minimising the Ribbon in an Auto_Open macro Jeff Wiggins Excel Discussion (Misc queries) 3 May 9th 08 03:35 PM
Auto_Open Macro Trying to Excel Excel Discussion (Misc queries) 2 April 13th 07 07:08 AM
Can I make an Auto_open macro conditional? David M Hargrave Excel Discussion (Misc queries) 2 August 25th 06 10:26 AM
Force read-only in auto_open macro hhalle Excel Discussion (Misc queries) 0 August 20th 06 10:44 AM


All times are GMT +1. The time now is 01:20 PM.

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

About Us

"It's about Microsoft Excel"