HELP! run-time error 424

H

harvey

I am using an excel spreadsheet to track my portfolio. The macros and
spreadsheet works fine on my win2000 machine at home but not on my XP
machine at work. The spreadsheet opens but when I hit the pricing
function that prices my positions from yahoo.com I get this run-time
error '424':


MICROSOFT FORMS


Could not load an object because it is not available on this machine.


When I hit debug I get this part of the below text highlighted in
yellow:


xx = Inet1.OpenURL(myURL)


----------------------------------------
Private Sub doit()
BuildRanges


'Build list of open symbols:
SymbList = ""
SymbCount = 0
For i = openStart To openEnd
If Cells(i, colSymbol) <> "" Then
If SymbCount <> 0 Then
SymbList = SymbList & ","
End If
SymbList = SymbList & Trim(Cells(i, colSymbol))
SymbCount = SymbCount + 1
End If
Next i


'Get quotes from Yahoo
myURL = "http://finance.yahoo.com/d/quotes.csv?s=" & SymbList &
"&f=sl1d1t1c1ohgv&e=.csv"
xx = Inet1.OpenURL(myURL)
Open quotesFile For Output As #1
Print #1, xx;
Close #1
UserForm1.Hide


' Update Open Trades with current prices
Open quotesFile For Input As #1
Do While Not EOF(1)
Input #1, Ysymbol, Yprice, Ydate, Ytime, Ychg, Yopen, Yhigh,
Ylow, Yvolume
For i = openStart To openEnd
If Trim(Ysymbol) = Trim(Cells(i, colSymbol)) Then
Cells(i, colCurrPrice) = Yprice
Cells(i, colPriceDate) = Ydate
End If
Next i
Loop
Close #1


End Sub
-------------------


Any ideas on what is causing this and how can I fix it?


Thanks for any help!
 

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