N
no.reply7
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.
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.