I did all these stuff, but the error message still comes, and besides, why
doesn't it look up the zip code from cell A1, and then import it in Excel?
:
I did what you wrote, but there are two problems:
1. It only open a google page, but does not search anything, nor import the
info to excel.
2. An error message comes up saying: Runtime error 2147467259 (80004005)'
Method 'Busy' of
object 'Iwebbrowser2' failed
and this line is highlighted when I press debug:
Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
Thanks for your help, but please try to help me further, until weget this
thing done.
Thanks again.
:
now it tells me the problem is "Worksheet". I tried putting a' before
worksheet as well, but then other problems come up. Can you please help me
clear out this problem, or tell me any easy way to be able tomake a web
query to search fot the zip code that will be in cell A1?
:
The words Submit button should be commented. Web browsers don't really allow
you to copy info the way it was typed. Just put a ' before the words submit
button and re-run.
art wrote:
It tells me there is an error "sub or finction not defined". And it
highlights the words "submit Button". Do you know what's the problem?
Thanks.
Where should I paste it in? In "Sheet1" or in "ThisWorkBook"? And what should
I do afterwards? Thanks for your help.
[quoted text clipped - 58 lines]
Next copy/paste the code from above into the module between Sub and
End Sub. Then, just run the macro...Ron
--
Message posted viahttp://
www.officekb.com-Hidequotedtext -
- Show quoted text -
Art...When I pasted my code into this newsgroup, the Google format
editor unfotuneately broke the text in a manner that, as you noted,
will create errors. Dustin's response is correct in terms ofhow to
remedy the problem. More completely the following lines needto be
adjusted
' Make the desired selections on the Login web page and click the
submit button
should appear all on one line in your code as
' Make the ......... the submit button
----------------------------------------------------------------------------------------
' Copy the entire web page and then paste it as text into the
worksheet
also place this all on one line as
' Copy the entire .......... into the worksheet
--------------------------------------------------------------------------------------------
ActiveSheet.PasteSpecial Format:="Text", Link:=False,
DisplayAsIcon:=False
also place this all on one line as
note: no apostrophe at the beginning of this line
ActiveSheet.PasteSpecial ....... =False, DisplayAsIcon:=False
Now try running the code, it should work. Let me know how it
goes...Ron- Hide quoted text -
- Show quoted text -
1. It only open a google page, but does not search anything, nor import the
info to excel.
When you run the macro is the sheet containing the zip code in cellA1
the activesheet? For the macro to run correctly, it must be the
activesheet (e.g. the sheet you see when you view the Excel workbook)
2. An error message comes up saying: Runtime error 2147467259 (80004005)'
Method 'Busy' of
object 'Iwebbrowser2' failed
and this line is highlighted when I press debug:
Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
try
Do Until ie.ReadyState = READYSTATE_COMPLETE And Not ie.Busy
Also, while viewing the code in the Visual Basic Editor, click on
Tools, then References. Make sure the following references are
checked:
Visual Basic for Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library- Hide quoted text -
- Show quoted text -