Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open .mpp out of excel

Status
Not open for further replies.

colty

Programmer
Jan 30, 2006
2
AT
Hi,

I want to open an existing MSProject file out of an excel macro?? Can somebody help me?

Regards
 
Have you tried the GetObject function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes i used this, but i get an error

Set pjApp = GetObject("C:project.mpp", "MSProject.application")
 
Hi

Try this...

Code:
Dim strFileName As String
Dim objProject As Object

Set objProject = CreateObject("MSProject.Application")
strFileName = Application.GetOpenFilename("MS Project (*.mpp),*.mpp", , "Select MS Project File to import from")
objProject.FileOpen Name:=strFileName, NoAuto:=True

'Do whatever you want to with it

objProject.FileClose 0  '0 = Do Not Save File
Set objProject = Nothing
I hope this helps/makes sense!

Annelies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top