P
Peter
Hi, Friends,
I have following code in an add-in for MS Project in order to prevent user
from modifying two fields, but the cancel=true causes my MS project stuck to
the cell just modified. Please give your ideal.
Private Sub applicationObject_ProjectBeforeTaskChange(
ByVal tsk As Microsoft.Office.Interop.MSProject.Task,
ByVal Field As Microsoft.Office.Interop.MSProject.PjField,
ByVal NewVal As Object,
ByRef Cancel As Boolean)
Handles applicationObject.ProjectBeforeTaskChange
If (Field = MSProject.PjField.pjTaskDuration) Then
MsgBox("In Duration")
Cancel = True
End If
If (Field = MSProject.PjField.pjTaskNumber18) Then
MsgBox("In Number18")
Cancel = True
End If
End Sub
I have following code in an add-in for MS Project in order to prevent user
from modifying two fields, but the cancel=true causes my MS project stuck to
the cell just modified. Please give your ideal.
Private Sub applicationObject_ProjectBeforeTaskChange(
ByVal tsk As Microsoft.Office.Interop.MSProject.Task,
ByVal Field As Microsoft.Office.Interop.MSProject.PjField,
ByVal NewVal As Object,
ByRef Cancel As Boolean)
Handles applicationObject.ProjectBeforeTaskChange
If (Field = MSProject.PjField.pjTaskDuration) Then
MsgBox("In Duration")
Cancel = True
End If
If (Field = MSProject.PjField.pjTaskNumber18) Then
MsgBox("In Number18")
Cancel = True
End If
End Sub