Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
refer to active window when more than one window open for a file mcambrose Excel Programming 4 November 17th 08 08:16 PM
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
Docking Project Explorer, Properties window and Code window in VBE jayray Setting up and Configuration of Excel 2 March 27th 07 04:42 PM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM


All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"