A
aross
Hi Folks
My app (Access 2003) is to produce spreadsheets for all operators within a
chosen region.
Once the user chooses the region I need to produce a separate excel file for
each operator within that region.
Each of these files may contain several worksheets depending on the number
of projects the operator handles.
In order to achieve this, I have a .xlt file with one Worksheet - Sheet1.
As the prog loops thru the projects for each organiser it makes a copy of
sheet1 for each project and populates it.
This works fine, and the prog correctly names and saves the xls file - the
problem arises when the loop swings back to the next operator in the
recordset.
Even although i am closing the workbook, (wkbXL.Close) and quitting the
Excel app
(appXL.Quit) and setting both wkbXL and appXL = nothing, when the loop comes
round, Excel is still running in the background.
The effect is that when the code gets back to the top and creates a new
excel app we have 2 apps running and subsequent code fails!!
How do I stop the instance of Excel so that I can start a new instance
thereafter?
Thanks for any help
Arthur
My app (Access 2003) is to produce spreadsheets for all operators within a
chosen region.
Once the user chooses the region I need to produce a separate excel file for
each operator within that region.
Each of these files may contain several worksheets depending on the number
of projects the operator handles.
In order to achieve this, I have a .xlt file with one Worksheet - Sheet1.
As the prog loops thru the projects for each organiser it makes a copy of
sheet1 for each project and populates it.
This works fine, and the prog correctly names and saves the xls file - the
problem arises when the loop swings back to the next operator in the
recordset.
Even although i am closing the workbook, (wkbXL.Close) and quitting the
Excel app
(appXL.Quit) and setting both wkbXL and appXL = nothing, when the loop comes
round, Excel is still running in the background.
The effect is that when the code gets back to the top and creates a new
excel app we have 2 apps running and subsequent code fails!!
How do I stop the instance of Excel so that I can start a new instance
thereafter?
Thanks for any help
Arthur