Re: Parameters in events

From: Mark Durrenberger (durrenm_at_yahoo.com)
Date: 11/23/04


Date: Tue, 23 Nov 2004 13:52:39 -0500

Perhaps I misunderstand your question but do you want to disable your code
within the projecbeforechange...

If so, you can set the class containing the event code to "nothing"

Mark

-- 
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________
The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.
- Sir John Harvey-Jones
"Montse" <Montse@discussions.microsoft.com> wrote in message
news:E7156C0C-AD85-4BA8-8FDC-D90D9E95C501@microsoft.com...
>
>    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.
>


Relevant Pages

  • Parameters in events
    ... I’m working with the event ProjectBeforeResourceChange2 in MS Project ... MSProject.Resource, ByVal Field As PjField, ByVal NewVal As Variant, Info As ...
    (microsoft.public.project.vba)
  • Re: Vlookup syntax format
    ... Dim myDate As Date ... Dim res As Variant ... What I read was that Microsoft wasn't putting VBA with the latest Mac ...
    (microsoft.public.excel.programming)
  • Re: Writing a Boolean Statement Parser/Engine - Need help
    ... Dim Eval As CEval, Expression As String, ResAs Variant, i as Long ... Walters and so on are one dim arrays of Booleans. ...
    (microsoft.public.vb.general.discussion)
  • Re: vlookup
    ... Function tazAs Variant ... Dim res As Variant ... taz = "Error in c,d,e,f!" ...
    (microsoft.public.excel.programming)
  • Re: trying to use null but getting no where
    ... Dim v As Variant ... not " IsNull (res) " ... Msgbox "It's Null!" ... calculating on them and passing off this to another function. ...
    (comp.databases.ms-access)

Loading