A gracious individual posted a solution to my problem here:
http://www.mrexcel.com/forum/showthread.php?p=2172141#post2172141
However, the solution doesn't work for me. For whatever reason I can't install (MICROSOFT INTERNET CONTROLS) or (MICROSOFT HTML OBJECT LIBRARY).
I need help finding out how to find and install these references or I need help with an alternate solution. I currently receive object errors when running the below code.
Thanks for reviewing.
http://www.mrexcel.com/forum/showthread.php?p=2172141#post2172141
However, the solution doesn't work for me. For whatever reason I can't install (MICROSOFT INTERNET CONTROLS) or (MICROSOFT HTML OBJECT LIBRARY).
I need help finding out how to find and install these references or I need help with an alternate solution. I currently receive object errors when running the below code.
Thanks for reviewing.
Code:
Sub Medicare()
'reference: Microsoft Internet Controls
'reference: Microsoft HTML Object Library
Dim Ie As InternetExplorer
Dim arr, a
Set Ie = New InternetExplorer
Ie.Visible = True
'##############################################################################
'*******************Choose Physician or Other HealthCare Provider**************
'##############################################################################
Ie.navigate ("[URL]http://www.medicare.gov/Physician/Se...cianSearch.asp[/URL]")
Do
If Ie.readyState = READYSTATE_COMPLETE Then
Ie.Visible = True
Exit Do
Else
DoEvents
End If
Loop
Do Until Ie.document.readyState = "complete"
Loop
'USE VIEW SOURCE TO GET FORM ELEMENT IDS
Set arr = Ie.document.getElementsByName("btnSubmit")
For Each a In arr
a.Click
Next a
Do Until Ie.document.readyState = "complete"
Loop
Set arr = Ie.document.getElementsByName("btnSubmit")
For Each a In arr
If a.Value = "Find a Physician" Then
a.Click
Exit For
End If
Next a
Do Until Ie.document.readyState = "complete"
Loop
Set arr = Ie.document.getElementsByName("Type")
For Each a In arr
If a.Value = "STATE" Then
a.Click
Exit For
End If
Next a
End Sub