?
Solved

Using IHTMLFormElement

Posted on 2004-03-25
3
Medium Priority
?
489 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 2000 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

Technology Partners: 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

840 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