Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Why do I have to restart Excel when ActiveSheet.QueryTables.Add fails?

So that you know, I’ve looked on various fora but except for the fact
that Excel 2007 seems not to have this problem, I could not find an
answer for previous versions of Excel.

Here is my query:

With ActiveSheet.QueryTables.Add(Connection:="TEXT;http ://
ichart.finance.yahoo.com/table.csv?s=msft&ignore=.csv",
Destination:=Range("A1"))
.RefreshStyle = xlOverwriteCells
.TextFileCommaDelimiter = True
.TextFileColumnDataTypes = Array(1, 9, 9, 9, 1, 9, 9)
.Refresh BackgroundQuery:=False
End With

Obviously BLABLABLA is not a valid ticker symbol but occasionally,
even with a valid ticker symbol, the query fails, for example, if
Yahoo! Finance website or the internet connection is down.

Once a query fails, I need to shut Excel down to start a valid query.

I cannot verify that the problem does not occur with Excel 2007 (I
still use 2003).

My questions a
Does having 2007 solve the problem?
Is there a workaround for previous versions of Excel?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Why do I have to restart Excel when ActiveSheet.QueryTables.Add fails?

ooops. My query was supposed to read:

ActiveSheet.QueryTables.Add(Connection:="TEXT;http ://
ichart.finance.yahoo.com/table.csv?s=BLABLABLA&ignore=.csv",
Destination:=Range("A1"))

MSFT is a valid ticker symbol





On Nov 23, 8:07*am, Frank wrote:
So that you know, I’ve looked on various fora but except for the fact
that Excel 2007 seems not to have this problem, I could not find an
answer for previous versions of Excel.

Here is my query:

With ActiveSheet.QueryTables.Add(Connection:="TEXT;http ://
ichart.finance.yahoo.com/table.csv?s=msft&ignore=.csv",
Destination:=Range("A1"))
* * .RefreshStyle = xlOverwriteCells
* * .TextFileCommaDelimiter = True
* * .TextFileColumnDataTypes = Array(1, 9, 9, 9, 1, 9, 9)
* * .Refresh BackgroundQuery:=False
End With

Obviously BLABLABLA is not a valid ticker symbol but occasionally,
even with a valid ticker symbol, the query fails, for example, if
Yahoo! Finance website or the internet connection is down.

Once a query fails, I need to shut Excel down to start a valid query.

I cannot verify that the problem does not occur with Excel 2007 (I
still use 2003).

My questions a
Does having 2007 solve the problem?
Is there a workaround for previous versions of Excel?

Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveSheet.QueryTables.Add David Excel Programming 0 March 10th 08 10:39 PM
ActiveSheet.QueryTables.Add Rick Excel Programming 4 November 10th 05 04:24 AM
ActiveSheet.QueryTables.Add quartz[_2_] Excel Programming 0 November 9th 05 07:18 PM
ActiveSheet.QueryTables.Add using a File DSN Brian Howenstein Excel Programming 1 April 6th 04 11:45 AM
With ActiveSheet.QueryTables.Add [email protected] Excel Programming 4 January 6th 04 04:58 PM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"