Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filling web forms from excel
You haven't set the oIE variable.
Tim "iCalculate" wrote in message oups.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto filling Forms | Excel Worksheet Functions | |||
Filling up Forms | Excel Discussion (Misc queries) | |||
filling combox box with same logic in 2 < forms | Excel Programming | |||
Where do I find a template for filling out 1099-MISC forms? | Excel Discussion (Misc queries) |