W
WD
The sample code below creates a master project from inserted projects.
i = 1
sFileInUse = False
InUse = 1
Do Until i = cnt
MyAttr = GetAttr(prjdir & sFileArray(i)) And vbReadOnly
If MyAttr <> 0 Then
sFileInUse = True
InUse = InUse + 1
sFilesInUse(InUse) = sFileArray(i)
GoTo Continue
Else
ConsolidateProjects Filenames:=prjdir & sFileArray(i),
NewWindow:=False, AttachToSources:=False, _
HideSubtasks:=True, openpool:=pjDoNotOpenPool
End If
Continue:
sFileInUse = False
i = i + 1
Loop
Using GetAttr, I am trying to determine if the file is in use. However, I am
not getting the correct result. How else can I determine if a file is
currently opened before I insert it into the master project? Any tips would
be helpful.
WD
i = 1
sFileInUse = False
InUse = 1
Do Until i = cnt
MyAttr = GetAttr(prjdir & sFileArray(i)) And vbReadOnly
If MyAttr <> 0 Then
sFileInUse = True
InUse = InUse + 1
sFilesInUse(InUse) = sFileArray(i)
GoTo Continue
Else
ConsolidateProjects Filenames:=prjdir & sFileArray(i),
NewWindow:=False, AttachToSources:=False, _
HideSubtasks:=True, openpool:=pjDoNotOpenPool
End If
Continue:
sFileInUse = False
i = i + 1
Loop
Using GetAttr, I am trying to determine if the file is in use. However, I am
not getting the correct result. How else can I determine if a file is
currently opened before I insert it into the master project? Any tips would
be helpful.
WD