View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default Do I have to close an odc in a macro?

The general rule that I follow is to always clean things up when you are done
playing (I gave my son the same rule to follow, but that is completely
different). If you are done with a connection close it and set it to nothing.
You will never go wrong following this guide line. Truth be known I could not
tell you what difficulties you might run into if you leave the connections
open because I have never been curious enough to find out.
--
HTH...

Jim Thomlinson


"Tachikrusher" wrote:

I have set up a macro in Excel that imports Access queries. The number of
queries the macro imports varies depending upon the number of changes showing
on the summary tab in my workbook. For each change, there are 3 queries that
run and I have an odc for each query. After the query is run, does the odc
have to be "closed"? I get an error if there are several changes on my
summary sheet.