Home Referencing Cells from Spreadsheet and Populating Corresponding Cells
Reply: 0

Referencing Cells from Spreadsheet and Populating Corresponding Cells

user1754
1#
user1754 Published in August 14, 2018, 8:27 am

Edit: More information - the objective of this program is to pull from an existing list of names, search the website, and bring back the corresponding NPI numbers. Thanks to user @omegastripes I was advised to shift my focus to XHR. My question is regarding, how to populate the search with the names of the providers, and loop so that it will return the NPI's in the next cells over in the spread sheet for the remaining providers.

Related, what to do in the event nothing populates from the search

original post: Title - Do you want to continue? Internet Explorer pop up - VBA

Internet Security pop up prevents my code from continuing. Normally I would disable this request but my computer security access is limited due to using a work computer.

My question, is there a way to click "Yes" on this pop up using VBA?

Here is my code so far.

Sub GetNpi()

Dim ie As Object

'create a new instance of ie
Set ie = New InternetExplorer
ie.Visible = True

'goes to site
ie.navigate "npinumberlookup.org"
Do While ie.readyState <> READYSTATE_COMPLETE
     Loop

Set ieDoc = ie.document

'select search box last name and Fill in Search Box
ie.document.getElementById("last").Focus
ie.document.getElementById("last").Value = "testlastname"

'select search box first name and Fill in Search Box
ie.document.getElementById("first").Focus
ie.document.getElementById("first").Value = "testfirstname"

Do While ie.readyState <> READYSTATE_COMPLETE
     Loop

'select state drop down box enter TX
ie.document.getElementById("pracstate").Focus
ie.document.getElementById("pracstate").Value = "TX"

'click submit button
ie.document.getElementById("submit").Click

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.927936 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO