Solved

Using IHTMLFormElement

Posted on 2004-03-25
3
476 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 28

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 28

Expert Comment

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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