Run Time Error 458 Project2003 -> Project 2007

  • Thread starter Trutz-Sebastian Stephani
  • Start date
T

Trutz-Sebastian Stephani

I built a Event Handler which catches the BeforeTaskChangeEvent. This worked
fine in Project 2003. But in Project 2007, when I open a new Project and want
to save it the following scenario occurs:
-Clicking the Save Button
-BeforeSaveEvent triggered
-Dialog Box to insert Project name and some Project Enterprise Field
information
-Clicking Save Button in Dialog Box after inserting information
-BeforeTaskChangeEvent is triggerd but VBA doesn't enter the Sub, instead
the Run-Time Error 458: Variable uses an Automation Type not supported in
Visual Basic

Any Ideas?

Thanks in advance,
Trutz-Sebastian Stephani
 
S

Samu

I built a Event Handler which catches the BeforeTaskChangeEvent. This worked
fine in Project 2003. But in Project 2007, when I open a new Project and want
to save it the following scenario occurs:
-Clicking the Save Button
-BeforeSaveEvent triggered
-Dialog Box to insert Project name and some Project Enterprise Field
information
-Clicking Save Button in Dialog Box after inserting information
-BeforeTaskChangeEvent is triggerd but VBA doesn't enter the Sub, instead
the Run-Time Error 458: Variable uses an Automation Type not supported in
Visual Basic

Any Ideas?

Thanks in advance,
Trutz-Sebastian Stephani

I have same problem. And after 1st save is complete closing project ->
opening it -> saving -> no errors.. this is pretty wierd.
Haven't find any solutions and opened ticket to Microsoft but haven't
got any answers.
 
T

Trutz-Sebastian Stephani

Thanks for writing, so at least I'm not the only one with this error. I also
forwarded it to Microsoft, but also didn't hear anything back.
Cheers,
Trutz
 
C

Craig L M

We are having the exact same problem. The BeforeTaskChange Event is throwing
the 458 run time error upon entry. It worked fin 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 is 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? 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 chaned 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)

I would be curious to know if the others who are having this problem are
also seeing it on the 188744826 field?

If no one can help, can you at least point us to a resource who can? 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.
 
J

John

We are having the same issue. Did you find a solution for this?

Wendee,
Without context or a reference to another post, we can't help you (i.e.
what issue?).

John
Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top