Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows NT / Applications / June 2005

Tip: Looking for answers? Try searching our database.

Closing applications & processes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles L. Phillips - 07 Jun 2005 07:00 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.