You can use WIthEvents on the Excel object and sink any of the events
exposed by the Excel Automation interface. I'd guess that the File Save
and File Close methods are exposed. If you search on GoogleGroups I'm
sure you could find some canned code.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Colleyville Alan" <aecharbonneau@nospam.comcast.net> wrote in message
news:qvXkc.10669$kh4.673935@attbi_s52...[color=blue]
> "DCM Fan" <dcmfan@aol.comSPNOAM> wrote in message
> news:20040501190223.25458.00000700@mb-m29.aol.com...
>[color=green]
> > Then why do you need to embed the Excel files? Can't the Excel files[/color][/color]
live[color=blue]
> their[color=green]
> > own lives, doing their own things, with VBA code that populates[/color][/color]
external[color=blue][color=green]
> > databases as needed?[/color]
>
> Well, this nextpart of your reply changes my thinking:[color=green]
> > At any rate, no embedded object that I know of "knows" that it's[/color][/color]
embedded,[color=blue]
> and[color=green]
> > "knows" what its parent object is, when it's activated.[/color]
>
> I was assuming that with the object embedded, it would be aware of the
> underlying database (I'm obviously not an ActiveX expert). I have[/color]
done some[color=blue]
> work with automation, but had so many problems with "ghost' Excel[/color]
objects in[color=blue]
> memory, that I wanted to avoid using Excel to the extent possible.
>
> snip
>[color=green]
> > Than again, you say these model already exist (as normally-created[/color][/color]
Excel[color=blue]
> file,[color=green]
> > I assume), so I don't even understand why you need Formula One[/color][/color]
ActiveX at[color=blue][color=green]
> > all...[/color]
>
> Basically, I wanted my application to be run from within Access, but[/color]
using a[color=blue]
> spreadsheet since that is what is familiar to the users. Running the[/color]
Excel[color=blue]
> models as stand-alone apps is what is done now. I want to launch it[/color]
from[color=blue]
> Access and capture data back whenever the spreadsheet is saved.[/color]
Obviously,[color=blue]
> I do not have a good understanding of how this might occur. But the[/color]
idea is[color=blue]
> that if they want to run the Excel cost models, they must initiate the
> request from within Access (maybe VBA and automation from a command[/color]
button).[color=blue]
> When they finish and save, Access gets the current date and key data.[/color]
Then[color=blue]
> I have something useful in Access that management can use.
>[color=green]
> > But I'm still not sold on this whole idea. If you work it out, I'd[/color][/color]
like to[color=blue]
> see[color=green]
> > your defintion of "success."[/color]
>
> Developing the concept is one thing, but how I will handle the
> implementation is still a mystery to me.
>
>[/color]