P
Paul Conroy
I have placed the macro below in the before save event of the Ent.Global and
all works well.
That is except for in the following scenario, when the app returns a runtime
1004 error:
User makes a change in the schedule, select file, close, keeping the
settings of save changes and check-in project.
Any insight as to why this error only occurs in the scenario would be
greatly appreciated.
Thanks
Paul
'check that a project is loaded
If Not pj Is Nothing Then
'check whether the plan has been previsouly saved
If ActiveProject.LastSaveDate <> "" Then
'was any previous save less than 15 mins ago
If DateDiff("n", ActiveProject.LastSaveDate, Now) < 15 Then
'prompt user to save baseline
Dim msg As Integer
msg = MsgBox("Do you wish to save an interim baseline?",
vbYesNo, "Save Baseline")
'if response is yes then save baseline 10
If msg = vbYes Then
BaselineSave All:=True, Copy:=0, Into:=20
End If
End If
End If
End If
all works well.
That is except for in the following scenario, when the app returns a runtime
1004 error:
User makes a change in the schedule, select file, close, keeping the
settings of save changes and check-in project.
Any insight as to why this error only occurs in the scenario would be
greatly appreciated.
Thanks
Paul
'check that a project is loaded
If Not pj Is Nothing Then
'check whether the plan has been previsouly saved
If ActiveProject.LastSaveDate <> "" Then
'was any previous save less than 15 mins ago
If DateDiff("n", ActiveProject.LastSaveDate, Now) < 15 Then
'prompt user to save baseline
Dim msg As Integer
msg = MsgBox("Do you wish to save an interim baseline?",
vbYesNo, "Save Baseline")
'if response is yes then save baseline 10
If msg = vbYes Then
BaselineSave All:=True, Copy:=0, Into:=20
End If
End If
End If
End If