View Single Post
  #2   Report Post  
Jamie Collins
 
Posts: n/a
Default


Arvi Laanemets wrote:
when the query is run, the source workbook is
opened (as Read-only). And another oddity: after the query finishes,

and I
try to close the source workbook, the Excel attempts to close the

target
workbook instead

Has someone a clue, what is the reason for such behaviour, and how to

avoid
it.


Are you querying an open workbook? I occasionally see such behaviour
when I inadvertently query (with ADO) a workbook I have opened and
locked in another instance of Excel. Querying an open workbook is an
absolute no-no with ADO and something I still would not recommend when
using another data access tool e.g. MSQuery.

Jamie.

--