PRJ: Cannot Execute Macros with Optional Arguments |
Q124369
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:
Cannot find the macro 'macroname'
To 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)
Microsoft 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.
In 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: BugList4.00
Keywords : kbcode kbprogramming kbofficeprog
Issue type : kbprb
Technology : kbHWMAC kbOSMAC kbProjectSearch kbProject400Mac kbProjectMacSearch kbProject400
|
Last Reviewed: March 31, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |