Trying to help our Project 2013 Users out with some VBA code, and we have come to a point where we can't seem to find an answer for finding if a Project 2013 file is checked out on our PWA server using VBA. They basically have a list of Projects set as tasks in a single Project file, and the VBA code loops through the list of tasks to run FileOpenEx, do some changes, and then closes it. However, the need is to be able to check to see if the Project File is checked out prior to running FileOpenEx on each Project in the list. Here is a sample of what I'm going for that doesn't quite do what I want it to.
SelectBeginning
While ActiveCell.CellColor <> pjBlack
fname = "<>\" & ActiveCell.Task.Name
justname = ActiveCell.Task.Name
On Error Resume Next
If Application.Projects.CanCheckOut(fname) Then '<--This does not work correctly, not checking Enterprise Projects?
FileOpenEx Name:=fname, ReadOnly=false
'Do Some stuff
FileCloseEx Save:=pjSave, CheckIn:=True
FileSave
Else
MsgBox (justname & " can not be checked out")
End If
SelectCell Row:=1
Wend
If anyone has a better solution, an easy way to check this, or another workaround to finding out if an Enterprise Project is checked out through VBA code, please let me know. Thanks!