[AccessD] Access Function To Create Spreadsheet Fails On 2nd Run

Gustav Brock Gustav at cactus.dk
Thu Dec 8 04:18:33 CST 2005


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





More information about the AccessD mailing list