PRJ: Cannot Execute Macros with Optional ArgumentsLast reviewed: November 24, 1997Article ID: Q124369 |
The information in this article applies to:
SYMPTOMS If a Visual Basic, Applications Edition, sub procedure in Microsoft Project is defined with only optional arguments, it will appear in the list of available macros. If you attempt to run the macro, the following will occur:
WORKAROUNDTo keep the procedure from appearing in the list of available macros, use the Private keyword when you declare it. For example, the following procedure appears in the macro list:
Sub OptTest(Optional dummy As Variant)If you declare the macro as Private, as in the following example, it will not appear in the macro list:
Private Sub OptTest(Optional dummy As Variant) STATUSMicrosoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIn general, only sub procedures with no defined arguments appear in the list of available Microsoft Project macros. However, if a sub procedure is defined with only optional arguments, it will be displayed in the list of available macros.
|
Additional query words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |