Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Please refer to the following code. This code works fine on my office machine, but does not work on my laptop and home machine. All three machines have Excel 2003, SP3, and MS XP. When I run the code on my laptop, the macro stops at the line : BUSY and the following error message is displayed. Runtime error -2147023170, Automation error, The remote procedure call failed. My guess is that the error has something to do with the way I have defined the IE object. I tried changing the Dim IE As New SHDocVw.InternetExplorer declaration to Dim IE as Object and Dim IE as InternetExplorer, but the error did not go away. Code:
Dim IE As New SHDocVw.InternetExplorer '*** Dim URL As String Dim Ext As String Dim ocell As Range Dim file_loc As String Dim ResultDIV As HTMLDivElement, AllResultsDIV As HTMLDivElement, OneResultDIV As HTMLDivElement Dim message As String Dim htmlDoc As MSHTML.HTMLDocument Dim htmlInput As MSHTML.HTMLInputElement Dim htmlColl As MSHTML.IHTMLElementCollection Dim counter As Integer Dim DLd As Boolean file_loc = "C:\newfolder\" Set IE = CreateObject("InternetExplorer.Application") With IE .Visible = 1 .Navigate "http://www.fxstreet.com/forum/showthread.php?t=2910" Do While .Busy: DoEvents: Loop ' runtime error occurs here or on the next line Do While .readyState < 4: DoEvents: Loop ... MG -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200907/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Anyway of accessing the internet from within excel 2007? | Excel Discussion (Misc queries) | |||
VBA - Internet Time Service | Excel Programming | |||
Run-Time Error 91 for Internet Explorer .elements(name).value | Excel Programming | |||
Why Excel is accessing Internet & Slowing Excel Performance | Excel Discussion (Misc queries) | |||
Office Apps accessing the Internet | Excel Discussion (Misc queries) |