Hello,
i try to cancel closing mpp file using the Project_BeforeClose event.
Is it possible to cancel closing the project file when the cancel button is hit ?
Thanks
Private Sub Project_BeforeClose(ByVal pj As Project)
Dim Msg As String
Dim answer As String
Msg = "Message."
answer = MsgBox(Msg, vbOKCancel, "Fichier de ressources")
If answer = vbCancel Then
MsgBox ("No!!")
Else
MsgBox ("Yes!!")
End If
End Sub
I found, function "ProjectBeforeClose2" may helps me
https://msdn.microsoft.com/en-us/library/office/aa204890(v=office.11).aspx