J
Jose X Perez
Hi everyone,
I'm trying to use a macro in project server in order to update a custom task
field.
But i do not know how to access the value of others defined task custom
fields.
the macro that works localy in mi pc is
Private Sub App_ProjectBeforeTaskChange(ByVal t As Task, _
ByVal Field As PjField, _
ByVal NewVal As Variant, _
Cancel As Boolean)
If Field <> pjTaskNumber2 Then
If t.Summary Or t.OutlineLevel = 1 Then
Rem MsgBox ("summary")
t.Number2 = t.Number1 * t.Number3 / 100
End If
If t.Summary And t.OutlineLevel > 1 Then
t.Number2 = t.Number1 * t.OutlineParent.Number2 / 100
End If
If Not t.Summary And t.OutlineLevel > 1 Then
Rem MsgBox ("not summary")
t.Number2 = t.Number1 * t.OutlineParent.Number2 / 100
End If
End If
End Sub
in order to make this works in the preject server i need to access the
taskCustomFieldNumber isntead of Number1
How can i do this? or i must use PSI ?
i preffer not to use PSI because i'll need to use a programer and i do not
have the resource.
thanks for your help
Jose X Perez
I'm trying to use a macro in project server in order to update a custom task
field.
But i do not know how to access the value of others defined task custom
fields.
the macro that works localy in mi pc is
Private Sub App_ProjectBeforeTaskChange(ByVal t As Task, _
ByVal Field As PjField, _
ByVal NewVal As Variant, _
Cancel As Boolean)
If Field <> pjTaskNumber2 Then
If t.Summary Or t.OutlineLevel = 1 Then
Rem MsgBox ("summary")
t.Number2 = t.Number1 * t.Number3 / 100
End If
If t.Summary And t.OutlineLevel > 1 Then
t.Number2 = t.Number1 * t.OutlineParent.Number2 / 100
End If
If Not t.Summary And t.OutlineLevel > 1 Then
Rem MsgBox ("not summary")
t.Number2 = t.Number1 * t.OutlineParent.Number2 / 100
End If
End If
End Sub
in order to make this works in the preject server i need to access the
taskCustomFieldNumber isntead of Number1
How can i do this? or i must use PSI ?
i preffer not to use PSI because i'll need to use a programer and i do not
have the resource.
thanks for your help
Jose X Perez