Event ProjectBeforeResourceChange2

M

Montse

Hello,

I’m working with the event ProjectBeforeResourceChange2 in MS Project
Professional 2002.

The procedure which implements it, has the next parameters:

Private Sub object_ProjectBeforeResourceChange2(ByVal res As
MSProject.Resource, ByVal Field As PjField, ByVal NewVal As Variant, Info As
MSProject.EventInfo)

But I can compile my code only when I write:
Private Sub object_ProjectBeforeResourceChange2(ByVal res As
MSProject.Resource, ByVal Field As PjField, ByVal NewVal As Variant, ByVal
Info As MSProject.EventInfo)

The parameter Info only admits ByVal and not ByRef or nothing. As a
result, the variable's value can't be changed by the procedure to which it is
passed so I can’ stop the event although I assign the value true to
Info.Cancel.

What can I do to avoid that event happens?

Thank you in advance.
 

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

Similar Threads


Top