Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tell if workbook is opened in IE
Hey Guys,
I was wondering if there is a way I can tell if a workbook that has been opened is hosted in Interner Explorer. Ideally what I would like to do is checked if the workbook/ excel application is hosted in IE on one of the Applciation start up events and then disable some off my code accordingly. Thanks for you help. Regards........Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tell if workbook is opened in IE
I was wondering if there is a way I can tell if a workbook that has
been opened is hosted in Interner Explorer. I'd love to know this as well. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tell if workbook is opened in IE
In another forum, Jim Rech suggested using ActiveWorkbook.Container.
Ture Magnusson posted this using Jim's suggestion: Thanks Jim! Container works perfectly... Sub CheckIfInInternetExplorer() 'Declare local variable Dim x As Object 'Try to get container object On Error Resume Next Set x = ActiveWorkbook.Container On Error GoTo 0 'Show result depending on container's typename Select Case TypeName(x) Case "Nothing" MsgBox "The workbook is opened in Excel" Case "IWebBrowser2" MsgBox "The workbook is opened in Internet Explorer" Case Else MsgBox "The workbook is opened in another application: " & TypeName(x) End Select 'Clear object variable Set x = Nothing End Sub /Ture jnc wrote: Hey Guys, I was wondering if there is a way I can tell if a workbook that has been opened is hosted in Interner Explorer. Ideally what I would like to do is checked if the workbook/ excel application is hosted in IE on one of the Applciation start up events and then disable some off my code accordingly. Thanks for you help. Regards........Jim -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming | |||
Sheets select method fails when workbook is opened by another workbook | Excel Programming |