LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Open a File and Run AutoOpen Macro

But the code exists within workbook1.

Therefore, once you open workbook2 and closed workbook1, the code no longer
exists to run. Does that make sense?

Can you write this code in a separate workbook that you can leave open?

eg Workbook1 holds what it currently holds without the code, workbook3 holds
the code - both are open.
The code is run from workbook3, closes workbook1, opens workbook2, does what
is required, closes workbook2 then reopens workbook1, all the while workbook3
remains open.

" wrote:

I'm trying to use workbook.open to open another file and then I want this
other file to automatically run a macro. This other macro starts by closing
out the original file and then running a bunch of other code. I tried using
a Workbook_Open sub but as soon as the code closes the original file it just
stops running. I've tried everything I can think of but I cannot come up
with a solution. I need to open a specified file, then use this file to
close the original and run other code. Any ideas?

Thanks

Adam Bush



 
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
Autoopen of an Excel File at the set time mrbalaje Excel Programming 2 May 8th 07 04:41 AM
Open a file do a macro ( made) and open next succesive file SVTman74 Excel Programming 5 April 21st 06 10:14 PM
Macro to call a file that has a auto open macro in the file itself [email protected] Excel Programming 1 August 5th 05 06:39 AM
'Yes' 'No' button on autoopen macro Larry Excel Programming 2 May 21st 04 09:59 PM


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