Microsoft KB Archive/134664

PRJ4: Macro That Deletes Bar Text Produces Error

PSS ID Number: Q134664 Article last modified on 08-15-1995

4.00 | 4.00

WINDOWS | MACINTOSH

= SYMPTOMS =

If you create a macro that deletes bar text using the Visual Basic, Applications Edition, FormatBar method, Microsoft Project displays the following error message when you run the macro:

Run time error 1101

This problem occurs most commonly when you record a macro to remove bar text.

= CAUSE =

When the FormatBar method deletes bar text fields, Microsoft Project incorrectly assigns a value of “null” to the field.

= WORKAROUNDS =

To work around this problem, replace the bar text field that is in use with a text field that has never been used (do this instead of deleting the text). If the macro has already been recorded, use the following steps to edit it:


 * 1) On the Tools menu, click Macros.
 * 2) Select the recorded macro, and then click Edit.
 * 3) Find the line that begins with the GanttBarFormat method, and look for a set quotation marks (&quot;“) after one of the parameters (for example RightText:=”&quot;).
 * 4) Add text10 (for example) between the quotation marks.
 * 5) On the View menu, click Gantt Chart.

= STATUS =

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 more information here in the Microsoft Knowledge Base as it becomes available.

= MORE INFORMATION =

Microsoft Project allows up to ten text fields (Text1-Text10) for each task.

KBCategory: kbprg kbcode KBSubcategory:

= Additional reference words: 4.00 macro vb invalid nothing =

Copyright Microsoft Corporation 1995.