VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y

HolyHobo  (1 Submission)   Internet/HTML   VB 6.0   Unknown Difficulty   Sun 3rd March 2002   Mon 8th February 2021

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

Rate This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y (1(1 Vote))
This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y.bas

This code uses the webbrowser control to type text into a field on a webpage. Please e-mail me if y Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters