krubin
September 20th, 2001, 10:03 AM
I am trying to open a seperate instance of MS Project 2000. I thought that was what the New keyword would do, but if I am running MS Project when my App launches it uses the same instance. Here is my sample code. Thanks in advance for your help.
Option Explicit
Dim objMS As MSProject.Application
----------------------------------
Private Sub Command3_Click()
Set objMS = New MSProject.Application
objMS.Application.Visible = True
objMS.Projects.Add
End Sub
----------------------------------------
Private Sub Command4_Click()
objMS.Quit
Set objMS = Nothing
End
End Sub
Option Explicit
Dim objMS As MSProject.Application
----------------------------------
Private Sub Command3_Click()
Set objMS = New MSProject.Application
objMS.Application.Visible = True
objMS.Projects.Add
End Sub
----------------------------------------
Private Sub Command4_Click()
objMS.Quit
Set objMS = Nothing
End
End Sub