Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Close Browser window with VBA

I have the following code that sends a message to a web
page and tehn to a pager. bypassing the outlook object
model gaurd BUT it opens a new web page window. and I
want to close the windows after it is done sending.

Sub sendtopagers()
txtMessage = "Test"
PagerNumber = "2081234567"
fulltest = "PIN=" & PagerNumber & "&MSSG=" & txtMessage
& "&Q1=0"

ThisWorkbook.FollowHyperlink "http://www.Arch.com/cgi-
bin/wwwpage.exe", , True, , fulltest, msoMethodPost


Any Help would be apprecieated

Brian Elson

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Close Browser window with VBA

Hi Brianelson,

I don't know if I understood your question, but I think you have to handle
the IE as object with a code like this rough:

' =======Start Code=======
Dim IEObj As Object

Sub Test()
OpenIE "http://example.microsoft.com"
IEObj.Quit
Set IEObj = Nothing
End Sub

Public Sub OpenIE(vURL As String)
On Error GoTo ErrorHandler
IEObj.Visible = True
With IEObj
.Visible = True
.Navigate vURL
Do Until Not .Busy
DoEvents
Loop
End With
Exit Sub
ErrorHandler:
Set IEObj = Nothing
Set IEObj = CreateObject("InternetExplorer.Application")
Resume Next
End Sub
'======End Code========

--
HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)


"brianelson" escreveu na mensagem
...
I have the following code that sends a message to a web
page and tehn to a pager. bypassing the outlook object
model gaurd BUT it opens a new web page window. and I
want to close the windows after it is done sending.

Sub sendtopagers()
txtMessage = "Test"
PagerNumber = "2081234567"
fulltest = "PIN=" & PagerNumber & "&MSSG=" & txtMessage
& "&Q1=0"

ThisWorkbook.FollowHyperlink "http://www.Arch.com/cgi-
bin/wwwpage.exe", , True, , fulltest, msoMethodPost


Any Help would be apprecieated

Brian Elson



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
Copying info from a Browser window into Excel Don[_2_] Excel Worksheet Functions 2 March 20th 07 03:33 PM
Workbooks opening in browser window Richard Excel Discussion (Misc queries) 0 January 17th 07 05:52 PM
Launch new browser window from an excel web page Hal Anderson Excel Discussion (Misc queries) 2 January 20th 06 03:10 AM
file browser window saybut Excel Discussion (Misc queries) 1 August 15th 05 06:06 PM
Open all various hyperlinks in SAME browser window? Michael hauschild Links and Linking in Excel 2 July 13th 05 06:12 PM


All times are GMT +1. The time now is 06:20 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"