Hi,
just started playing about with vba and HTML.
Can someone give me a clue how to click the button Continue
<h2>Enter Your Car Registration Number</h2>
<div class="filler33"></div>
<input type="text" maxlength="10" name="license_plate" id="license_plate" class="plate" value="" />
<div class="filler24"></div>
<div class="clear"></div>
<button type="submit" class="button_continue_blue" title="Continue"> </button>
<input type="hidden" name="action" value="carRegistration" />
<p class="license_plate_nb">n.b. Reg Number info is used solely to verify vehicle details and to match parts</p>
</form>
</div>
Currently using this code which gets to the site and enters a registration, now all need to do is hit the blue continue button
Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Sub MyGmail()
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
On Error GoTo Err_Clear
' MyURL = "https://www.gmail.com"
MyURL = "http://www.1stchoice.co.uk/find-a-part"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True
Do
Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.document
HTMLDoc.all.license_plate.Value = "LV11VYT"
For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input") '("input")
If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For
'If MyHTML_Element.Title = "Continue" Then MyHTML_Element.Click: Exit For
Next
Err_Clear:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub
Bookmarks