D
Dean
A collegue asked me to if I could do "conditional formatting" in Project 2007
wherein a row is highlighted when a specific resource is chosen in the
Task.ResourceNames field. I'm attempting to follow this example:
http://blogs.msdn.com/project_programmability/archive/2007/02/12/vba-event-handler-example.aspx
I have the sample code working, but when I attempt to change it to highlight
the row based on the Resource Name, nothing happens. I receive no errors.
Here is the code I'm attempting:
Public WithEvents App As Application
Public WithEvents Proj As Project
Private Sub App_ProjectBeforeTaskChange(ByVal tsk As MSProject.Task, ByVal
Field As PjField, ByVal NewVal As Variant, Cancel As Boolean)
If (Field = pjResourceName) Then
If (InStr(NewVal, "Member Firm") = 1) Then
ActiveCell.CellColor = pjYellow
End If
End If
End Sub
Can anyone help with this?
wherein a row is highlighted when a specific resource is chosen in the
Task.ResourceNames field. I'm attempting to follow this example:
http://blogs.msdn.com/project_programmability/archive/2007/02/12/vba-event-handler-example.aspx
I have the sample code working, but when I attempt to change it to highlight
the row based on the Resource Name, nothing happens. I receive no errors.
Here is the code I'm attempting:
Public WithEvents App As Application
Public WithEvents Proj As Project
Private Sub App_ProjectBeforeTaskChange(ByVal tsk As MSProject.Task, ByVal
Field As PjField, ByVal NewVal As Variant, Cancel As Boolean)
If (Field = pjResourceName) Then
If (InStr(NewVal, "Member Firm") = 1) Then
ActiveCell.CellColor = pjYellow
End If
End If
End Sub
Can anyone help with this?