?
Solved

Submit button in webbrowser - VISUAL BASIC 6

Posted on 2012-03-14
5
Medium Priority
?
1,544 Views
Last Modified: 2012-04-11
Hello, i want to automate the process of submitting a form within the webbrowser1 in my visual basic project.

I want a code which will do something like this,

If a submit button exist on the page with the Value of "Send" or "Submit" then submit that button.

So far i have this,

WebBrowser1.Document.All("submit").Click

Thank you
0
Comment
Question by:SDfatha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 17

Expert Comment

by:vb_elmar
ID: 37720434
The following sample scans the web page for all input elements.

If the input element has the Value of "Send" or "Submit" it will be clicked.
3.zip
0
 
LVL 17

Accepted Solution

by:
vb_elmar earned 2000 total points
ID: 37724690
Private Sub Command2_Click()

For Each virtualButton In WebBrowser1.Document.getElementsByTagName("input")

If virtualButton.Type = "submit" Then
      isSUBMIT = virtualButton.Value = "Send" Or virtualButton.Value = "Submit"
      If isSUBMIT = True Then virtualButton.Click: Exit For
End If

Next virtualButton

End Sub
0
 
LVL 17

Expert Comment

by:vb_elmar
ID: 37726993
Today the webmaster of fastemailsender has changed the caption of the "Send" button,

The caption of the "Send" button is now "Send message".
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 37831670
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month7 days, 22 hours left to enroll

765 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