Runtime 458 Error in ProjectBeforeTaskChange VBA

C

CraigO

I am getting this run time error when the project is saved the first time in
Pro 2007. I first saw this last spring, and waited patiently for SP1 to come
out. It didn't fix the problem.
I am not the only one seeing this bug.
https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=275452&SiteID=235&wa=wsignin1.0
http://www.eggheadcafe.com/software/aspnet/29579256/run-time-error-458-projec.aspx
http://www.awomantoldme.com/women/how-to/30516068/runtime-error-458-occures.aspx
http://www.awomantoldme.com/women/how-to/29980202/runtime-error-458.aspx
https://connectbeta.microsoft.com/f...px?FeedbackID=307285&SiteID=235&wa=wsignin1.0
http://www.developerfood.com/runtim...5620-4bf6-4512-a949-3a40b70509e0/article.aspx

Why can't something be done about it? Does anyone have any info on a
hotfix? The only workaround I have found is unbinding the event handler from
the app temporarily, and this isn't possible for user initiated saves.

Thanks,
Getting mighty desperate...
 
R

Rod Gill

Hi,

The first link refers to a problem with a pjCommitment constant. Commitments
are what deliverables used to be called in the early days of Project 2007
development so the problem code in the first link was probably written using
an early Beta version of Project. Try the pjTaskDelievarbaleGUID instead.

I suspect different problems are being lumped together here. How do you
reliably reproduce the problem?

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 
C

CraigO

Yes, it is all the same problem. The first link only mentions the commitment
GUID because that is what the field constant was referred to as in the MS
help when you search for that field constant. I realize it is the same as
the deliverable GUID. The code in question never even does anything with
deliveralbes.

It sohould be easily reproducable in a Project Pro/Server 2007 environment.
You should only need to bind the event handler to the application in VBA, and
have a ProjectBeforeTaskChange defined. You shouldn't even need code in the
event handler, or even try to change a task. When you do a SaveAs of a file
for the first time in MSP Pro 2007, it will hit that event handler a few
times (at least) for various fields in each task in your project. One of the
fields it tries to enter that routine for is the deliverable GUID (and even
though the deliverable GUID has never been changed) you get the run time 458
"automation type" error when trying to enter the routine. It doesn't enter
without erroring make it past the line:

Private Sub pApp_ProjectBeforeTaskChange(ByVal Tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)

It runs fine for all other fields that it thinks were changed, but each task
will produce this run time error once for the deliverable GUID. It seems to
only happen the first time a project is saved, (if you bypass the errors and
get it to complete the save).

If you can't reproduce it, you may need to try with a project 2003 project.
I have heard from a member of the project development team at MS, that they
have seen this error, and months ago I was lead to believe (by a MS partner)
that a fix was in the works and would be included in SP1, so I was very
dissapointed that it wasn't in there. Let me know if you need more info to
reproduce this, as I am eager to get it resolved. It may be reproducable
with just project pro without connecting to server (I don't remember trying
that).
 
C

CraigO

Yes, it is all the same problem. The first link only mentions the commitment
GUID because that is what the field constant was referred to as in the MS
help when you search for that field constant. I realize it is the same as
the deliverable GUID. The code in question never even does anything with
deliveralbes.

It sohould be easily reproducable in a Project Pro/Server 2007 environment.
You should only need to bind the event handler to the application in VBA, and
have a ProjectBeforeTaskChange defined. You shouldn't even need code in the
event handler, or even try to change a task. When you do a SaveAs of a file
for the first time in MSP Pro 2007, it will hit that event handler a few
times (at least) for various fields in each task in your project. One of the
fields it tries to enter that routine for is the deliverable GUID (and even
though the deliverable GUID has never been changed) you get the run time 458
"automation type" error when trying to enter the routine. It doesn't enter
without erroring make it past the line:

Private Sub pApp_ProjectBeforeTaskChange(ByVal Tsk As Task, ByVal Field As
PjField, ByVal NewVal As Variant, Cancel As Boolean)

It runs fine for all other fields that it thinks were changed, but each task
will produce this run time error once for the deliverable GUID. It seems to
only happen the first time a project is saved, (if you bypass the errors and
get it to complete the save).

If you can't reproduce it, you may need to try with a project 2003 project.
I have heard from a member of the project development team at MS, that they
have seen this error, and months ago I was lead to believe (by a MS partner)
that a fix was in the works and would be included in SP1, so I was very
dissapointed that it wasn't in there. Let me know if you need more info to
reproduce this, as I am eager to get it resolved. It may be reproducable
with just project pro without connecting to server (I don't remember trying
that).
 
C

CraigO

Ok. I'll take a look tomorrow and see if I can reproduce it easily while
running disconnected, and post the steps.
 
K

Kurt Verhaegen

Hi,

We had the same issue. It is a known bug, however Microsoft only released a
customer private patch. With this patch the issue is solved, but the patch is
not compatible with SP1. IN the past months we are using it, and are waiting
until Microsoft releases a post-SP1 hotfix for this issue.

Grtz Kurt
Exerti

PS. there is nothing wrong with your code.
 
C

CraigO

Kurt.
Thanks for the info. Can you give me more info on the patch, and how to
obtain it? Is there an article number that addresses it as a hotfix? I have
been unable to loate one. Usually the private hotfixes are written up and
then made available for others to request them, but this one is elusive.
Barring that, is there any way you could provide me the patch directly?
 

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