ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help needed with Run Time Error 1004 (https://www.excelbanter.com/excel-discussion-misc-queries/20402-help-needed-run-time-error-1004-a.html)

Manesh

Help needed with Run Time Error 1004
 
I am running a EXCEL macro to automate web query. It is a simple macro. The
trouble is sometimes it runs fine but other times it gives run time error
1004. Could some one suggest any solution. Thanks in advance

Here is my code:

Sub Try200()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://finance.yahoo.com/q/pr?s=[""Quote"",""Enter Stk Symbols""]", _
Destination:=ActiveCell)
.WebTables = "33"
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub


All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com