Everything works fine with this code...,but the last piece.
It's not selecting the proper HTML button.
I have included the HTML source code to identify tags:
Below is the full routine:
What should pull up are search results for a doctor...I just get a page asking for me to call the web administrator.
Code:
IE.Document.forms(0).submit
I have included the HTML source code to identify tags:
HTML:
Below is the full routine:
Code:
Sub NPIRegistry()
Dim IE
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate ("https://nppes.cms.hhs.gov/NPPES/NPIRegistrySearch.do?subAction=reset&searchType=ind")
Do
If IE.readyState = 4 Then
IE.Visible = True
Exit Do
Else
DoEvents
End If
Loop
'USE VIEW SOURCE TO GET FORM ELEMENT IDS
IE.Document.forms(0).all("searchNpi").Value = Range("I10")
IE.Document.forms(0).all("firstName").Value = Range("I8")
IE.Document.forms(0).all("lastName").Value = Range("I9")
IE.Document.forms(0).all("state").Value = Range("I13")
IE.Document.forms(0).submit
End Sub