by HolyHobo (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 3rd March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if you know how to do this with the inet
API Declarations
'Put text in a field on the web page
Dim i As Long, HTMLElement
On Error GoTo Err_Init
For i = 1 To WebBrowser1.Document.All.length
Set HTMLElement = WebBrowser1.Document.All.Item(i)
If Not (HTMLElement Is Nothing) Then
If StrComp(HTMLElement.tagName, "INPUT", vbTextCompare) = 0 Then
If StrComp(HTMLElement.Name, FieldName, vbTextCompare) = 0 Then
HTMLElement.Value = FieldValue
Exit For
End If
End If
End If
Next i
Exit Sub
Err_Init:
MsgBox Err.Number & " - " & Err.Description, vbCritical
Resume Next
End Sub
No comments have been posted about This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y. Why not be the first to post a comment about This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y.