Hello Bryan,
This macro will start Internet Explorer and open the the web page. It will then fill in the license number and click submit.
Sub GetLicenseInfo(LicenseNumber As Variant)
Dim Btn As Object
Dim ieApp As Object
Dim ieDoc As Object
Dim InputBtns As Object
Dim LicenseBtn As Object
Dim SubmitBtn As Object
Dim URL As String
URL = "http://www.ncbpe.org/process_request.php"
Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Navigate2 URL
ieApp.Visible = True
While ieApp.ReadyState <> 4
DoEvents
Wend
Set ieDoc = ieApp.Document
Set InputBtns = ieDoc.GetElementsByTagName("Input")
For Each Btn In InputBtns
If Btn.Value = " Submit search " Then
Set SubmitBtn = Btn
End If
If Btn.Name = "license" Then
Set LicenseBtn = Btn
End If
Next Btn
LicenseBtn.Value = LicenseNumber
SubmitBtn.Click
End Sub
Example of Calling the Macro
Sub TestIt()
GetLicenseInfo 211
End Sub
Bookmarks