ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code to tell if workbook is opened in browser (https://www.excelbanter.com/excel-programming/274478-re-code-tell-if-workbook-opened-browser.html)

BrianB

Code to tell if workbook is opened in browser
 
Don't know the exact answer - but why not just add an On Error line to your code.

Regards
BrianB
------------------------------------------------------


(Ted Theodoropoulos) wrote in message . com...
i have macros that won't run successfully in a browser window and need
to run in a stand alone instance of excel. is there a function that
can determine if the workbook is opened in IE or excel?

TIA


Ted Theodoropoulos

Code to tell if workbook is opened in browser
 
i could but each macro gives different errors. it would take a bit of
work to test every macro, record the error number and then trap it. i
will do it if i have to but it seems like a crude approach. i'm not
above using a crude approach i just hope there's a better way.

something with the application object maybe???


Don't know the exact answer - but why not just add an On Error line to your code.

Regards
BrianB


Tom Ogilvy

Code to tell if workbook is opened in browser
 
Some additional information


http://support.microsoft.com/?id=162059
How to Configure Internet Explorer to Open Office Documents in the
Appropriate Office Program Instead of in Internet Explorer
--
Regards,
Tom Ogivy




"Ted Theodoropoulos" wrote in message
om...
i could but each macro gives different errors. it would take a bit of
work to test every macro, record the error number and then trap it. i
will do it if i have to but it seems like a crude approach. i'm not
above using a crude approach i just hope there's a better way.

something with the application object maybe???


Don't know the exact answer - but why not just add an On Error line to

your code.

Regards
BrianB




Ted Theodoropoulos

Code to tell if workbook is opened in browser
 
thanks for the article that will help me personally but unfortunately
there will be several hundred users downloading this spreadsheet from
our intranet and i will have no control over how they configure IE. i
would think that the spreadsheet would open in the Intranet Zone and
allow me to manipulate it via VBA but for some reason, it doesn't.

this is a corporate environment where all IE settings are locked down
so i can't add trusted sites, etc. any other ideas???

Ted Theodoropoulos

Code to tell if workbook is opened in browser
 
brian, i really appreciate your feedback. however, if you read my
response it's easy to see that i'm aware of how to trap errors.
please let me know if there's any other approach you might be aware
of.

thanks again,

ted

Ted Theodoropoulos

Code to tell if workbook is opened in browser
 
thanks for the response jim. could you elaborate a little on what
you're proposing here. do you mean change something in the html
document that links to the spreadsheet? or after the spreadsheet is
open check the file path for the "file://" substring?

TIA


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

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