Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ODBC parameter query fails with HAVING | Excel Discussion (Misc queries) | |||
Macro query refresh fails | Excel Programming | |||
Excel Query fails to include data? | Excel Programming | |||
Macro does not work after the program has been restarted in excel.Run time error 2147417848 (80010108) Method visible of object_worksheet failed | Excel Programming | |||
after creating macro button, closed excel then restarted excel | Excel Discussion (Misc queries) |