View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
iCalculate iCalculate is offline
external usenet poster
 
Posts: 4
Default filling web forms from excel

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.