LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Passing Control when workbooks have the same name

FSt1 -

For 5am "firing" do you use anything fancy or just leave the file open with
an ontime = 5am macro?

"FSt1" wrote:

hi,
1.The workbook that contains the running macro must remain open.
2.You can run another macro in another workbook but the 1st workbook must
remain open because basicly the first macro called the second macro and
paused while the second macro ran. techniquely the first macro is still
running because it hasn't got to end sub yet. the call basicly inserted more
code into the running macro.
3.you can open another workbook and run a macro in the first workbook that
manipulated data in the second workbook but the first workbook cannot be
closed.

If you are thinking of manipulated several workbooks at a time, it would be
best to do what i did. create a special workbook that contains only macro.
open the macro workbook and run the macros that manipulates all the files.you
can write a macro that calls all the other macros.

my macro workbook fires at 5 in the morning(while i'm still at home asleep)
then runs 11 defferent macros that downloads data from the mainframe then
manipulates this data in 11 different files. Reports are on the printer when
i get to work. the 11 different files contain no macros because they are not
needed.

a word of caution. if you do have workbook with the same name.... you may
run into problems. i don't know what because i have never tried to open two
workbooks with the same name but that sounds risky.

good luck

FSt1



"shawb" wrote:


Basically I have several workbooks with the same name in different
directories for consistency reasons in my organization.

Is it possible from within one of these workbooks to close itself, and
open up another workbook (with the same name but in a different
directory) using a macro.

Or alternatively is it possible to execute a macro in another workbook
from the macros in a workbook? (Ie to temporarily pass control to a
third workbook that closes the current workbook and opens the desired
workbook).

Cheers


--
shawb
------------------------------------------------------------------------
shawb's Profile: http://www.excelforum.com/member.php...o&userid=14204
View this thread: http://www.excelforum.com/showthread...hreadid=390893


 
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
Passing variable values to userform control KJ-clueless Excel Discussion (Misc queries) 2 November 27th 07 10:51 PM
Passing the Name of a Control Between Macros Sandy Excel Programming 2 May 4th 05 03:02 PM
Passing Macros Between Workbooks Bernie Deitrick Excel Programming 1 June 30th 04 05:02 PM
Passing a variable between workbooks Rich Cooper Excel Programming 1 May 19th 04 07:27 PM
Passing Execution Control Between Workbooks RSnyder[_2_] Excel Programming 0 May 7th 04 02:01 PM


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