Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have inherited a macro that ran fine with Excel 97 & Excel 2000 but does not run with Excel XP. I get the following error message when I run the macro now. Application-defined or object-defined error Run-time error ‘1004' The error seems to be in .BackgroundQuery = True see section of code below. How do I need to change this so it run in Excel XP? Thanks JBEsr Range("C7").CurrentRegion.ClearContents i = 7 qurl = "http://finance.yahoo.com/d/quotes.csv?s=" + Cells(i, 1) i = i + 1 While Cells(i, 1) < "" qurl = qurl + "+" + Cells(i, 1) i = i + 1 Wend qurl = qurl + "&f=" + Range("C2") Range("c1") = qurl QueryQuote: With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl, Destination:=Sheets("yahoo").Range("C7")) 'JBE .BackgroundQuery = True <<<Error Here .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Dynamically changing Range in Excel Macro | Excel Discussion (Misc queries) | |||
How do I set up a formula with a changing range in an excel macro | Excel Discussion (Misc queries) | |||
Help with changing a Macro | Excel Discussion (Misc queries) | |||
Help with changing a Macro | Excel Discussion (Misc queries) | |||
Unable to run excel macro after changing file name | New Users to Excel |