Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA in IE window
Hi
Im accessing a spreadsheet via a link I have put in a web page. The spreadsheet opens up in an IE window. I am wanting to stop the "save changes" dialog box popping up when I close the window, I cant do this using the usual vba method because it doesnt apply to IE. Would like to exit using an "exit" command button, Any idea how to close the active IE window using VBA? Am also wanting to open it in full screen (compensate for the lack of a full screen command for "taget_blank" in HTML) Any suggestions gratefully received. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA in IE window
Try something like this
Sub CloseMe() Dim bIsIE As Boolean Dim objIE As Object If GetIE(objIE) Then objIE.FullScreen = False ThisWorkbook.Saved = True ' prevent Save dialogs objIE.Quit End If End Sub Function GetIE(objIE As Object) As Boolean If ThisWorkbook.IsInplace Then On Error Resume Next Set objIE = ThisWorkbook.Container If Not objIE Is Nothing Then GetIE = InStr(1, TypeName(objIE), "WebBro") 0 End If End If End Function Sub ToggleFullScreen() Dim objIE As Object If GetIE(objIE) Then objIE.FullScreen = Not objIE.FullScreen End If End Sub Put a button on the sheet with its OnAction asigned to "CloseMe" Not sure about FullScreen, as written it's not same as F11 in IE. Regards, Peter T "Atishoo" wrote in message ... Hi Im accessing a spreadsheet via a link I have put in a web page. The spreadsheet opens up in an IE window. I am wanting to stop the "save changes" dialog box popping up when I close the window, I cant do this using the usual vba method because it doesnt apply to IE. Would like to exit using an "exit" command button, Any idea how to close the active IE window using VBA? Am also wanting to open it in full screen (compensate for the lack of a full screen command for "taget_blank" in HTML) Any suggestions gratefully received. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
refer to active window when more than one window open for a file | Excel Programming | |||
how to save a desired window size but hv window comeup fullsz by d | Excel Discussion (Misc queries) | |||
View cell contents as a pop-up window (similar to comments window) | Excel Worksheet Functions | |||
Docking Project Explorer, Properties window and Code window in VBE | Setting up and Configuration of Excel | |||
The window opens in a smaller window not full sized window. | Excel Discussion (Misc queries) |