Closing Project cleanly in a VB program

D

Dan

I use the following statements to access my Project project files in a VB6
program:

Set MSProjectApp = CreateObject("MSProject.Application")

do some things

Set MSProjectApp = Nothing

This works fine, except that it usually leaves a Project icon on my taskbar.
If I click on the icon, it goes away without any errors or other problems. Is
there a way to get the icon to go away when I'm finished in my VB program,
rather than having to click on it in my taskbar?

Dan
 
R

Rod Gill

Have you tried setting to Nothing all other variables that might depend on
the application Object (such as Project and Task objects)?
 
J

Jan De Messemaeker

Hi,

I've always been told that before the = nothing one should code
MSProjectApp.Quit

HTH
 
D

Dan

Jan,

Thanks for the suggestion. That's what I needed to make it work the way I
wanted.

Dan
 

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