Is there VBA Code to see if Enterprise Project 2013 file is checked out before opening?
<p>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.</p>

<pre><code>SelectBeginning
While ActiveCell.CellColor &lt;&gt; pjBlack
   fname = "&lt;&gt;\" &amp; ActiveCell.Task.Name
   justname = ActiveCell.Task.Name

   On Error Resume Next
   If Application.Projects.CanCheckOut(fname) Then '&lt;--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 &amp; " can not be checked out")
   End If

   SelectCell Row:=1
Wend
</code></pre>

<p>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!</p>