Gustav Brock
Gustav at cactus.dk
Thu Dec 8 05:26:34 CST 2005
Hi Paul
Well, here that basic code has worked for years. I think I got the original skeleton from JC.
/gustav
>>> paul.hartland at isharp.co.uk 08-12-2005 11:35:39 >>>
That's exactly the old code I had in place still getting the same
error....but I will try changing it back and running it again with Jim Hales
code in between and see what I get....
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: 08 December 2005 10:19
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Access Function To Create Spreadsheet Fails On 2nd
Run
Hi Paul
No, you may not be closing the workbook properly. Try this:
objWB.Close
Set objWB = Nothing
/gustav
>>> paul.hartland at isharp.co.uk 08-12-2005 09:57:32 >>>
I used the code and I get the Excel Running message, the basis of my code is
Dim objExcel As Excel.Application
Dim objWB As Excel.Workbook
Set objExcel = New Excel.Application
Set objWB = objExcel.Workbooks.Open(strProd) ' strProd is a string
containing the path to the workbook template.
objExcel.Workbooks.Close
Set objWB = Nothing
objExcel.Application.Quit
Set objExcel = Nothing
And I have really tried every way I could think of of closing the workbook
and the application. Anyone know if I am closing the workbook and the
application incorrectly..
Paul Hartland