Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing a macro in another spreadsheet?


Greetings, I have once again achieved the state of 'being stumped' so
made my way over to this forum for a little assistance. Any help on
the below would be greatly appreciated!

I have a set of spreadsheets organized in a directory hierarchy. Each
spreadsheet already contains the names for the spreadsheets below in
the hierarchy. My problem, is at every 'level' of this spreadsheet, I
need to include a function which can 'push down' information to all
spreadsheets below it. This is what the hierarchy resembles:

Tier 1
--Tier 2
----Tier 3
----Tier 3
----Tier 3
--Tier 2
----Tier 3
----Tier 3
----Tier 3
--Tier 2
----Tier 3
----Tier 3
----Tier 3
etc...

The hierarchy itself is actually 4 tiers deep (soon to be expanded to
6). What I want to happen is if a certain cell is updated at Tier 1,
all of the spreadsheets below it need to be updated with that same
information (tier 2 and 3). Similarly, if a cell is updated at Tier 2,
all of the spreadsheets (at pre determined cells) below need to be
updated with the same information (tier 3).

What makes this tricky, is I don't want to just have the path of all
the below spreadsheets with manuel cell updates and whatnot. I would
like for this to be all automated. I have already found a way to have
the spreadsheets 'find' all the spreadsheets one tier below them, and
that is what I want to use to create this 'push down' effect.

If the spreadsheet from Tier 1 has the key cell updated (it will update
with a macro, so there is no problem with 'starting' the push down
function), the Tier 1 spreadsheet will update the information in the
Tier 2 spreadsheet, then call the 'push down' function from the Tier 2
spreadsheets, which will update the information to the Tier 3
spreadsheets... and so on.

Please provide any assitance you can. I am very much so out of
options.

Also, if there is an easyer yet different way to accomplish the same
effect, PLEASE let me know. I want to learn as much as I can. Thanks
in advanced!

Respectfully,
Eddie


--
ph8
------------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=385520

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Executing a macro in another spreadsheet?

No worries;)
Application.Run is your friend(see XL help).
Be shure that the the macro workbook is open first, though.

Dm Unseen

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing a macro in another spreadsheet?


Thank you DM Unseen.

One quick confirmation if thats ok. There is no way to do this without
opening the subsequent worksheet is there?

Or at least, can the data in individual cells be changed without having
to actually open other worksheets?

Thanks again for your help!


--
ph8
------------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=385520

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Executing a macro in another spreadsheet?

you can have the lower tier sheets link to existing data in upper tier
sheets using linking formulas. However, almost any other way of updating
the sheets would require opening them and applying the change - and likewise
that would trigger code within those workbooks that would open the next
lower tier and implement the change. (if the information added is new
information, then linking formulas would have to either preexist or be
created so that might not be an appoach). Also, if a change is made at tier
1 and a workbook is opened at tier3 before the tier2 workbook is opened, the
tier3 workbook would not have the new information.

I don't know what you are doing, but this seems very prone to get out of
sync. A common database accessed by all the sheets might be a sounder
solution - but I don't know what added value is provided by rippling through
the sheets.

--
regards,
Tom Ogilvy

"ph8" wrote in message
...

Thank you DM Unseen.

One quick confirmation if thats ok. There is no way to do this without
opening the subsequent worksheet is there?

Or at least, can the data in individual cells be changed without having
to actually open other worksheets?

Thanks again for your help!


--
ph8
------------------------------------------------------------------------
ph8's Profile:

http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=385520



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Executing a macro in another spreadsheet?

No, changing closed excel files I would not recommend, although it is
possible using ADO!

You need to code ADO with VBA to actually change a value in a closed
workbook.
But this means you will be accesing your workbook as a database and as
Tom states, you might have less worries if you did everything in a
real database.

DM Unseen



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
executing a macro within another brian Excel Discussion (Misc queries) 3 July 5th 06 01:22 AM
Executing macro in one book from another. michaelberrier Excel Discussion (Misc queries) 3 June 26th 06 10:45 AM
Executing a macro from a cell filo666 Excel Discussion (Misc queries) 2 February 15th 05 08:18 PM
What macro is executing? Ken Loomis Excel Programming 3 October 13th 04 05:39 AM
How to abort executing macro? perfb Excel Programming 1 June 16th 04 07:15 PM


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