Project checkout

D

Deva

i am writing VBScript to open a project and before opening the project, I am
checking whether the project is already checked out or not using
CanCheckOut(projectname) function. but every time it returns false value even
though the project is not checked out.

the code i am using

Sub IsCheckedOut(ProjectName)
If Projects.CanCheckOut(ProjectName) = True Then
MsgBox "You can check out the project"
Else
MsgBox "You can not check out the project"
End If
End Sub

is there any thing doing worng.. Pls help me on this..

Thanks in advance...
 
R

Rod Gill

That code looks alright to run in VBA, so is the ProjectName value correct.
Try opening the project manually then testing:
?Activeproject.name in the immediate window to compare.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com




Deva said:
i am writing VBScript to open a project and before opening the project, I
am
checking whether the project is already checked out or not using
CanCheckOut(projectname) function. but every time it returns false value
even
though the project is not checked out.

the code i am using

Sub IsCheckedOut(ProjectName)
If Projects.CanCheckOut(ProjectName) = True Then
MsgBox "You can check out the project"
Else
MsgBox "You can not check out the project"
End If
End Sub

is there any thing doing worng.. Pls help me on this..

Thanks in advance...

__________ Information from ESET Smart Security, version of virus
signature database 4488 (20091007) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4488 (20091007) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
R

Ray McCoppin

First the Projects collection is a collection of projects that are currently
open in Project Pro, not all of the projects on the project server. So for
this to work you would need to open the file readonly then check CanCheckOut
method.

Hope this helps
--
Ray McCoppin

http://www.randsmanagement.com
Project Server 2007 Automation Tools
Project Server 2007 Archive Tool
SRS gantt charts
 
D

Deva

Thanks for your inputs..

How to use this method to check whether a project in project server is
already checkout by other user?

Thanks
 

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