B
bill dawson
Hello,
When using the VB6-based designer to build a COM add-in for the VBA IDE
environment, I choose "Visual Basic for Applications IDE" as the
Application.
This is what I want, since I want to use the add-in in the VBA IDE in all
apps, but it seems to preclude me from knowing anything about the running
instance of the host application (Excel, Word, etc.) I might be missing it,
but I cannot find anything in the object hierarchy that will let me figure
out which running instance of which application is the owner of the
particular VBA session that the add-in is running in.
The only idea I've had so far is to use the API to figure out the EXE name
of the window owner -- that at least tells me if it's excel.exe, etc. I
could then use
GetObject(,"Excel.Application") to get a running instance, but it might not
be THE running instance of Excel if I have to have more than one running.
Am I crazy or is there no way to hook into the host app from a VBA IDE
add-in?
Many thanks,
Bill Dawson
When using the VB6-based designer to build a COM add-in for the VBA IDE
environment, I choose "Visual Basic for Applications IDE" as the
Application.
This is what I want, since I want to use the add-in in the VBA IDE in all
apps, but it seems to preclude me from knowing anything about the running
instance of the host application (Excel, Word, etc.) I might be missing it,
but I cannot find anything in the object hierarchy that will let me figure
out which running instance of which application is the owner of the
particular VBA session that the add-in is running in.
The only idea I've had so far is to use the API to figure out the EXE name
of the window owner -- that at least tells me if it's excel.exe, etc. I
could then use
GetObject(,"Excel.Application") to get a running instance, but it might not
be THE running instance of Excel if I have to have more than one running.
Am I crazy or is there no way to hook into the host app from a VBA IDE
add-in?
Many thanks,
Bill Dawson