Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook container - can't get it to work
I cannot get this to work - is there a reference I am missing or ???
Sub TestContainer() msgbox thisworkbook.container end sub I've gleened this from Sub CheckIfInInternetExplorer() 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 End Sub which I can't get to work either. It compiles, but activeworkbook.container yields an error. Ive tried three different machines, and have tried Excel 97, 2000 & 2003. I am trying to determine if the excel workbook has been opened in a browser, or the excel application. Thanks in advance, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Container in Auto open macro | Excel Discussion (Misc queries) | |||
Container property | Excel Programming | |||
Excel macro for delete a clipboard container | Excel Programming | |||
OLE Container Control in VB.NET | Excel Programming | |||
Iterate over Collection Objects in Container. | Excel Programming |