Hello,
I'm creating a database with MS-Access 97, that integrates MS-Excel 97 &
MS-Word 97.
The problem is, I use automation for both applications to run with the
Access database. When I close either Excel or Word, the systems runs slow. I
looked in Task Manager, and I see the excel.exe & winword.exe processes
still running...
How do I close either application & free the resources the application where
using???
Thank You,
--
Charles L. Phillips
Dave Patrick - 09 Jun 2005 00:09 GMT
Depends on how you're opening them. Typically this works.
Option Explicit
Dim filePath, oExcel, oSheet
filePath = "c:\Test.xls"
Set oExcel = CreateObject("Excel.Application")
oExcel.Workbooks.Open(filepath)
Set oSheet = oExcel.ActiveWorkbook.Worksheets(1)
oSheet.Name = "Some Sheet Name"
oSheet.Cells(1, 1) = "Hello"
oSheet.Cells(1, 2) = "World"
oExcel.ActiveWorkbook.Save
oExcel.ActiveWorkbook.Close
set oSheet = Nothing
Set oExcel = Nothing

Signature
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
| Hello,
| I'm creating a database with MS-Access 97, that integrates MS-Excel 97 &
[quoted text clipped - 10 lines]
| --
| Charles L. Phillips