ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VB: Problem Clicking Submit In Online Form (https://www.excelbanter.com/excel-programming/379435-excel-vbulletin-problem-clicking-submit-online-form.html)

[email protected]

Excel VB: Problem Clicking Submit In Online Form
 
Here's my problem...
I need to run records from an excel database through an online form,
then copy the results of the form back to excel somewhere. The problem

is that I can't get VB to click the submit button. I keep getting an
"automation error". Please help!

I'm just starting on this project, so I just wrote some basic code to
figure out how to access the url and enter the data.


Private Sub Form_Load()
' Open IE.
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")


' My variables - later, these will be fields from the database.
Dim strone As String
Dim strtwo As String
str strone = "xxx"
str strtwo = "yyy"


With ie
.Visible = True


' This line accesses the form and fills in the fields with the
variables
.Navigate "http://www.onlineform.com/form.jsp?field1=" +
strone + "&field2=" + strtwo


' This is what I can't get to work.
.document.forms(0).submit


End With


End Sub



All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com