Excel crashes with external dataset

P

Peter

Using Excel 97, I wrote a report that utilises data imported via an MS Query
..dqy file. I automated the report so that the only user input needed was the
setting of start and end dates. All okay, but I found no way of passing dates
as parameters to the query, so I added another small sub to open the .dqy
file as a text file and then rewrite it using the parameters the user
specifies, close it and call it as a query to import the data.

Rosy, but when the user attempts to save the workbook after running the
report, Excel immedately crashes, save as and workspace is the same deal.

Interestingly, when tried on a computer with Excel XP, it saved okay.

Suspecting the query was to blame I changed the way it is written, from
comma delimiting to tab delimiting, and presto, Excel 97 can now save it
again.

MS Query didn't seem to care, either way it could open, edit and save the
code generated query.

So my question is this - Excel obviously attempts to reconcile in some way
the query behind any external dataset in a workbook during the save process,
can anyone enlighten me on this process. Microsoft has been notably unhelpful
on the topic - this may be an old version of Excel, but I suspect that the
current version still does something similar.
Does anyone know anything more about this obscure little area of Excel?
 
Top