![]() |
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 |
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 |
All times are GMT +1. The time now is 01:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com