I must be something DUMB here - but WHAT?

G

Guest

See VB code below.

Please can anyone tell me why, after the myExplorer_Close event code executes in Form2 and Form2 unloads, Outlook.exe is still running in Task Manager - it only disappears when Form1 is unloaded

Form
-------

Private Sub Command1_Click(
Form2.Show vbModal, M
End Su

Form
-------

Private myOlApp As Outlook.Applicatio
Private myNameSpace As Outlook.NameSpac
Private myFolder As Objec
Private myTopFolder As Objec
Private WithEvents myExplorer As Outlook.Explore

Private Sub Command1_Click(

Set myOlApp = New Outlook.Applicatio
Set myNameSpace = myOlApp.GetNamespace("MAPI"
Set myTopFolder = myNameSpace.Folders("St Columba Calendar"
Set myFolder = myTopFolder.Folders("Calendar"
Set myExplorer = myFolder.GetExplorer(olFolderDisplayNoNavigation
myExplorer.Displa

End Su

Private Sub myExplorer_Close(
myOlApp.Qui
Set myOlApp = Nothin
Unload M
End Su
 
S

Sue Mosher [MVP]

You need to dereference all Outlook objects by setting them to Nothing when
you're done with them, i.e. in your Form2_Unload procedure.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



AndyK said:
See VB code below.

Please can anyone tell me why, after the myExplorer_Close event code
executes in Form2 and Form2 unloads, Outlook.exe is still running in Task
Manager - it only disappears when Form1 is unloaded?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top