C
Craig L M
We are having a problem running VBA code in 2007: The BeforeTaskChange Event
is throwing the a run time error upon entry. The BeforeTaskChangeEvent is
triggered but VBA code executon doesn't enter the Sub, instead we get:
Run Time Error 458: Variable uses an Automation Type not supported in Visual
Basic.
It worked fine in MSP 2003 VBA. It doesn't happen every time through the
event either. It seems to happen after the before save event fires, and I
have noticed only on the field 188744826 (which docs show as the Commitment
Guid (Task) field). I am not familiar with that field and I can't find it
referenced anywhere else. Could this field be causing the problem? Is this
the same field as the Deliverable Guid? If so, why two names?
Can someone that has more knowlege of MSP 2007 take a look at this? Is it a
bug in Project 2007? Our code hasn't changed from 2003 and exactly mirrors
the example found in the Project 2007 help, so I am assuming it should work.
Is there a library reference we need to add to the VBA project or something?
Here is the line of code that is failing with the 458 error:
Private Sub pApp_ProjectBeforeTaskChange(ByVal Tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)
and here is the example from the 2007 help:
Private Sub App_ProjectBeforeTaskChange(ByVal tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)
If no one can help, can you at least point us to a resource where we can get
some help? This is a critical problem that is delaying our Project 2007
solution and costing us a lot of dollars. I would settle for a work-around
at ths point. I am pretty much begging here...
Thanks,
Craig
is throwing the a run time error upon entry. The BeforeTaskChangeEvent is
triggered but VBA code executon doesn't enter the Sub, instead we get:
Run Time Error 458: Variable uses an Automation Type not supported in Visual
Basic.
It worked fine in MSP 2003 VBA. It doesn't happen every time through the
event either. It seems to happen after the before save event fires, and I
have noticed only on the field 188744826 (which docs show as the Commitment
Guid (Task) field). I am not familiar with that field and I can't find it
referenced anywhere else. Could this field be causing the problem? Is this
the same field as the Deliverable Guid? If so, why two names?
Can someone that has more knowlege of MSP 2007 take a look at this? Is it a
bug in Project 2007? Our code hasn't changed from 2003 and exactly mirrors
the example found in the Project 2007 help, so I am assuming it should work.
Is there a library reference we need to add to the VBA project or something?
Here is the line of code that is failing with the 458 error:
Private Sub pApp_ProjectBeforeTaskChange(ByVal Tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)
and here is the example from the 2007 help:
Private Sub App_ProjectBeforeTaskChange(ByVal tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)
If no one can help, can you at least point us to a resource where we can get
some help? This is a critical problem that is delaying our Project 2007
solution and costing us a lot of dollars. I would settle for a work-around
at ths point. I am pretty much begging here...
Thanks,
Craig