LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Query fails, requiring excel to be closed and restarted

I am using following query:

With ActiveSheet.QueryTables.Add(Connection:= "TEXT:my_query",
Destination:=ActiveCell)
.SaveData = True
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 9, 9, 9, 9, 9, 1)
.Refresh BackgroundQuery:=False

It works fine unless the query fails. At that point, when running a
subsequent valid query, I get the following error message:

Microsoft Office Excel cannot access the file etc...
There are several possible reasons:
The file name or path does not exist
The file is being used by another program
The workbook you are trying to same has the same name as a currently
open workbook

I have to to shut excel down to make the query work again. If I only
close and reopen, the query still fails.

I've search for the problem but found not workable solution.

Any thoughts?

Thanks.

 
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
ODBC parameter query fails with HAVING Stephanie Excel Discussion (Misc queries) 1 August 1st 07 09:36 PM
Macro query refresh fails rick_mc Excel Programming 1 March 22nd 07 06:09 PM
Excel Query fails to include data? Office 2K Issues Excel Programming 1 October 26th 05 02:15 AM
Macro does not work after the program has been restarted in excel.Run time error 2147417848 (80010108) Method visible of object_worksheet failed [email protected] Excel Programming 7 August 24th 05 03:11 PM
after creating macro button, closed excel then restarted excel hjd43 Excel Discussion (Misc queries) 1 March 3rd 05 03:04 AM


All times are GMT +1. The time now is 12:03 AM.

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"