Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on .Submit

Status
Not open for further replies.

DrMingle

Technical User
May 24, 2009
116
US
I cannot get this form to submit without an error page...on the website.

Any help?

Code:
Sub SpeedSearchPhysician_NPIRegistry()
    Dim IE
    Set IE = CreateObject("InternetExplorer.application")
    IE.Visible = True
    IE.navigate ("[URL unfurl="true"]https://nppes.cms.hhs.gov/NPPES/NPIRegistrySearch.do?subAction=reset&searchType=ind")[/URL]
    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
 
I actually get all the fields to fill out fine in the web form (i.e. Search NPI, First Name, Last Name, etc...but for whatever reason I get hung up on selecting the submit button and sending it through...


Code:
    '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
[\code]
 
Sorry, I'm not really a web person - it works, as best I can tell, for me, but I get 'not found' error messages because I don't know what to look for.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
If it helps below is the actual HTML code...I have tried several combination. I wasn't sure if some sort of click command or button command would work here...but the elements are all there:

Input type = submit
Name = subaction
value = search
Class = button

Code:
			<td align="center"><input type="submit" name="subAction" accesskey="l" value="Search" class="button" title="Search"></td>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top