How to if excel is running in a web browser

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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 :
 
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
 
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 :
 
Back
Top