[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Excel VB: Problem Clicking Submit In Online Form

jonathan.trousdale

12/14/2006 6:06:00 PM

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?fie... +
strone + "&field2=" + strtwo


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


End With


End Sub