RE: Clearing objects in a VBProject
From: Jim Thomlinson (JimThomlinson_at_discussions.microsoft.com)
Date: 02/08/05
- Next message: Tom Ogilvy: "Re: macro stop before end if I use a shortcut ?"
- Previous message: JD: "Running an excel spread*** from a website"
- In reply to: VBA Dabbler: "Clearing objects in a VBProject"
- Next in thread: VBA Dabbler: "RE: Clearing objects in a VBProject"
- Reply: VBA Dabbler: "RE: Clearing objects in a VBProject"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Feb 2005 11:23:01 -0800
Have you tried
set xlApp = nothing
in your Word code?
"VBA Dabbler" wrote:
> How do you clear an object from the VBProject once it has served its
> usefulness?
>
> I've done the following:
> 1. Opened a workbook from a Word VBProject with the following code:
> Dim xlApp As Excel.Application
> Dim FileString As String
> FileString = "C:\MyDocuments\MyWorkbook.xls"
> Excel.Application.Visible = True
> Workbooks.Open (FileString) 'Focus is now on the workbook
> 2. Closed workbook by closing Excel
>
> I've found that there is still an instance of the an object reference to the
> Excel app - there is the "Excel.exe" process in the Windows Taskmanager.
>
> I've found that when I reset the VBProject where the above code resides, the
> instance is cleared and the "Excel.exe" process in the Windows Taskmanager is
> removed.
>
> Do you know how to selectively clear the instance of the object reference in
> the VBProject?
>
> Thanks,
>
> VBA Dabbler
- Next message: Tom Ogilvy: "Re: macro stop before end if I use a shortcut ?"
- Previous message: JD: "Running an excel spread*** from a website"
- In reply to: VBA Dabbler: "Clearing objects in a VBProject"
- Next in thread: VBA Dabbler: "RE: Clearing objects in a VBProject"
- Reply: VBA Dabbler: "RE: Clearing objects in a VBProject"
- Messages sorted by: [ date ] [ thread ]