ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can you tell how Excel is launched? (https://www.excelbanter.com/excel-programming/310224-can-you-tell-how-excel-launched.html)

Gail Hurn

Can you tell how Excel is launched?
 
We have an Excel add-in. We would like to know if the application is started
from the menu by the user or started by another Office application. Is using
the ConnectMode parameter in the OnConnection call the best way to do this?


Jake Marx[_3_]

Can you tell how Excel is launched?
 
Hi Gail,

Gail Hurn wrote:
We have an Excel add-in. We would like to know if the application is
started from the menu by the user or started by another Office
application. Is using the ConnectMode parameter in the OnConnection
call the best way to do this?


Not sure this will help, but look at the UserControl property of the
Application object. Note that this will only give you a definitive answer
if the app was created programmatically AND is hidden.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Gail Hurn

Can you tell how Excel is launched?
 
Thanks! That worked perfect.

"Jake Marx" wrote:

Hi Gail,

Gail Hurn wrote:
We have an Excel add-in. We would like to know if the application is
started from the menu by the user or started by another Office
application. Is using the ConnectMode parameter in the OnConnection
call the best way to do this?


Not sure this will help, but look at the UserControl property of the
Application object. Note that this will only give you a definitive answer
if the app was created programmatically AND is hidden.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]



Gail Hurn

Can you tell how Excel is launched?
 
Is there a way to determine what application launched Excel?

Thanks,
Gail

"Jake Marx" wrote:

Hi Gail,

Gail Hurn wrote:
We have an Excel add-in. We would like to know if the application is
started from the menu by the user or started by another Office
application. Is using the ConnectMode parameter in the OnConnection
call the best way to do this?


Not sure this will help, but look at the UserControl property of the
Application object. Note that this will only give you a definitive answer
if the app was created programmatically AND is hidden.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]




All times are GMT +1. The time now is 07:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com