filling web forms from excel

I

iCalculate

Hi,

I need to develope a solution which will fill up web forms directly
from excel. Sub should loop trough cells and automatically submit each
data input. I found an earlier post "Filling out usernames in IE", but
when I try to use it with google.com for example within this code
posted by 6/10/2006 9:30:22 AM by: Randy Harmelink, quote:
Sub google_search()
Set oForm = oIE.Document.forms(0)
For Each oCell In Sheets(1).Range("A1:A500")
If oCell.Value = "" Then Exit For
oForm("f").Value = oCell.Offset(0, 0)
oForm(".save2").Click
Do: DoEvents: Loop While oIE.Busy
Do: DoEvents: Loop Until oIE.ReadyState = READYSTATE_COMPLETE
Set oForm = oIE.Document.forms(0)
Next oCell
oForm(".cancel").Click
End Sub

I've changed it a bit to suit my needs. When i run this it displays
error msg "Object required" on line ">Set oForm =
oIE.Document.forms(0)". I have references set to minrosoft internet
controls. I don't know what else to do. Please advise on this. Thanks.
 
T

Tim Williams

You haven't set the oIE variable.

Tim


iCalculate said:
Hi,

I need to develope a solution which will fill up web forms directly
from excel. Sub should loop trough cells and automatically submit each
data input. I found an earlier post "Filling out usernames in IE", but
when I try to use it with google.com for example within this code
posted by 6/10/2006 9:30:22 AM by: Randy Harmelink, quote:


I've changed it a bit to suit my needs. When i run this it displays
error msg "Object required" on line ">Set oForm =
oIE.Document.forms(0)". I have references set to minrosoft internet
controls. I don't know what else to do. Please advise on this. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top