Can you pass parameters for OnAction in MS Project VBA?

Posted by Anne Schuessler on Stack Overflow See other posts from Stack Overflow or by Anne Schuessler
Published on 2010-05-24T19:55:05Z Indexed on 2010/05/24 20:01 UTC
Read the original article Hit count: 171

Filed under:
|
|
|

The way I can define a method to be executed with OnAction in VBA with Microsoft Project is as follows (and works correctly):

.OnAction = "Macro ""DoSomething"""

... where DoSomething is the method to execute.

I would like to pass a parameter to that method but can't find a way to pass it with this syntax. Does anybody have an idea how to do this? I'm getting the feeling that this is an impossible task, but maybe there's some VBA secret I'm not aware of.

Please note that VBA in MS Project seems to have its quirks and is slightly different than VBA for Excel or Access. This seems to be the case for the OnAction property which needs the extra Macro keyword to work correctly. If I'm wrong here please enlighten me.

© Stack Overflow or respective owner

Related posts about vba

Related posts about macros