Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Handle Pop-Up While Navigating with IE

I have a macro that 1) opens IE, 2) navigates to the Medicare website, 3) logs me in, 4) and then compares the claims listed on the website with those already in the workbook and alerts me to any differences. It is during the log-in step that I have a problem, so I've reproduced that portion of the code below. As soon as the ".click" line is executed a pop-up window appears asking the user to click the "OK" button in order to proceed. Macro execution is suspended until I manually click the "OK" button on the pop-up. The source code behind the "www.mymedicare.gov" web page has information relative to the pop-up, but I haven't been able to figure out how to use it so that I can programmatically click the pop-up "OK" button. Any help in terms of figuring out how to programmatically click the pop-up's "OK" button would be much appreciated. BTW, for the purpose of this question, any id and pw can be inserted. If you handle the pop-up you'll be passed to a page that says something like incorrect id \ pw, and that would indicate that you've been successful in handling the pop-up...TIA, ron

Sub Medicare_Claims()'
' Update the status bar
Application.StatusBar = "Running the Medicare Claims subroutine"

' Open the "MyMedicare web page
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "https://www.mymedicare.gov/"
End With

' Loop until the page is fully loaded
Do Until ie.ReadyState = 4 And Not ie.Busy
DoEvents
Loop

' Log-in
ie.Document.all.Item("ctl00_ContentPlaceHolder1_ct l00_HomePage_SWEUserName").Value = "abcde"

ie.Document.all.Item("ctl00_ContentPlaceHolder1_ct l00_HomePage_SWEPassword").Value = "12345"

ie.Document.getElementById("ctl00_ContentPlaceHold er1_ctl00_HomePage_SignIn").Click

' Loop until the page is fully loaded
Do Until ie.ReadyState = 4 And Not ie.Busy
DoEvents
Loop

Application.Wait (Now + TimeValue("0:00:15"))

' Navigate further to the Search Claims" web page
ie.Navigate "https://www.mymedicare.gov/searchclaims.aspx"
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
Navigating ~ One Fine Old Dude Excel Worksheet Functions 0 June 6th 07 06:35 PM
navigating with the tab key Cynthia[_2_] New Users to Excel 1 April 17th 07 05:18 PM
Fill handle turned into a move handle Northwoods Excel Discussion (Misc queries) 1 March 2nd 07 03:40 PM
Navigating Gibbie Excel Discussion (Misc queries) 9 January 31st 05 10:49 PM
Navigating Hafeez Esmail Excel Programming 11 November 19th 03 07:18 PM


All times are GMT +1. The time now is 08:26 AM.

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

About Us

"It's about Microsoft Excel"