CodeItBetter Programming Another VB Programming Blog

How to Auto-fill web forms

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'Internet - How to Auto-fill web forms
Option Explicit
 
'set references for "Microsoft Internet controls" and "Microsoft HTML Object library".
Private WithEvents strtxtBox As HTMLTextAreaElement
Private IE As InternetExplorer
Private WithEvents strEmail As HTMLTextAreaElement
Private Sub Command1_Click()
    Set IE = New InternetExplorer
    With IE
        .Visible = True
        .navigate "www.gamespot.com"
    End With
    Do Until IE.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop
    'the following lines will use the text box names from the site to identify the
    '<input type="text" name="EMAILADDR" class="mr5" style="width:100px;"
    Set strtxtBox = IE.document.Forms(0).PASSWORD
    Set strEmail = IE.document.Forms(0).EMAILADDR
    strtxtBox.innerText = "pass"
    strEmail.innerText = "email@hotmail.com"
    IE.document.frames.execScript "document.login.submit()", "JavaScript"
End Sub

Related posts:

  1. How to open a new window of Internet Explorer and browse to a specific file
  2. How to get the Last Modified Date of a Web Page
  3. How to list URL of all open Internet Explorer and Windows Explorer windows
  4. How to make all opened Internet Explorer windows to Full screen mode
  5. How to Grab all of the text from WebBrowser control.
  6. How to view HTML Source
  7. C++ Programming site
  8. How to Get all currently open IE and Explorer windows
  9. Celestialcoding is BACK
  10. How to Retreive the Source code of a web page

Filed under: Internet Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.