Solved

Using IHTMLFormElement

Posted on 2004-03-25
3
473 Views
Last Modified: 2008-03-04
Can anyone give me an example of how to use VB to:
1.) Navigate the browser to a web page that contains a form
2.) Populate the form
3.) Submit the form

Thanks!
0
Comment
Question by:AmyL
  • 3
3 Comments
 
LVL 27

Accepted Solution

by:
Ark earned 500 total points
ID: 10684925
  Dim ie As Object
   On Error Resume Next
   Set ie = CreateObject("InternetExplorer.Application")
   ie.Navigate strURL
      While ie.ReadyState < 4
      DoEvents
   Wend
'  ie.Visible = True
   ie.Document.All("UserName").Value = "MyName"  
   ie.Document.All("Password").Value = "MyPassword"  
   ie.Document.All("Submit").Click
0
 
LVL 27

Expert Comment

by:Ark
ID: 10684959
This is a test from VB
0
 
LVL 27

Expert Comment

by:Ark
ID: 10684968
PS above post was a test of following code:

Private Sub Command1_Click()
   Dim ie As Object
   On Error Resume Next
   Set ie = CreateObject("InternetExplorer.Application")
   ie.Navigate "http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20932909.html"
      While ie.ReadyState < 4
      DoEvents
   Wend
   ie.Visible = True
   ie.Document.All("body").Value = "This is a test from VB"
   ie.Document.All("Submit").Click
End Sub
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 86
SQL VB connection works in one PC and doesn't in another 15 64
How to compare ms sql hashbytes results within vb6 5 76
Automatic Email Reminder 4 39
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question