ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to if excel is running in a web browser (https://www.excelbanter.com/excel-programming/331587-how-if-excel-running-web-browser.html)

stockbuildingsupply

How to if excel is running in a web browser
 
i have a web application that streams an excel workbook to the client. i
want to prevent the user from saving the workbook locally. the user should
only be able to work with the workbook through the web browser. is there a
way to tell if excel is being run in a web browser?

keepITcool

How to if excel is running in a web browser
 
look at the workbooks' container property

but be carefull you cannot do it in any open event
as the container is only available when the book is
fully loaded.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


stockbuildingsupply wrote :

i have a web application that streams an excel workbook to the
client. i want to prevent the user from saving the workbook locally.
the user should only be able to work with the workbook through the
web browser. is there a way to tell if excel is being run in a web
browser?


stockbuildingsupply

How to if excel is running in a web browser
 
thanks for your response. can you show me some code to do this. when i try
to run the code with Application.ActiveWorkbook.Container an error is
generated. can this code be placed in the Workbook_Activate event?

thanks

"keepITcool" wrote:

look at the workbooks' container property

but be carefull you cannot do it in any open event
as the container is only available when the book is
fully loaded.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


stockbuildingsupply wrote :

i have a web application that streams an excel workbook to the
client. i want to prevent the user from saving the workbook locally.
the user should only be able to work with the workbook through the
web browser. is there a way to tell if excel is being run in a web
browser?



keepITcool

How to if excel is running in a web browser
 

it cannot be placed in the activation event directly.
you'll need to delay it until activation has completed.

In the workbook_activate event include an application.ontime
to call the "containertest" with a 1 second delay.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


stockbuildingsupply wrote :

thanks for your response. can you show me some code to do this.
when i try to run the code with Application.ActiveWorkbook.Container
an error is generated. can this code be placed in the
Workbook_Activate event?

thanks

"keepITcool" wrote:

look at the workbooks' container property

but be carefull you cannot do it in any open event
as the container is only available when the book is
fully loaded.

--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



stockbuildingsupply wrote :

i have a web application that streams an excel workbook to the
client. i want to prevent the user from saving the workbook
locally. the user should only be able to work with the workbook
through the web browser. is there a way to tell if excel is
being run in a web browser?




All times are GMT +1. The time now is 09:54 PM.

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