XL98: Syntax Error Running Macro That Inserts WordArtLast reviewed: February 20, 1998Article ID: Q181468 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel 98 Macintosh Edition, if you insert a WordArt object while you are recording a Microsoft Visual Basic for Applications macro, and then run the macro, you may receive the following error message:
Compile error: Syntax error CAUSEThis problem may occur if the text in the WordArt object you insert contains any quotation marks. When you record the commands to create this kind of WordArt object, Microsoft Excel 98 Macintosh Edition may not insert the correct combination of quotation marks in the recorded code, and the macro does not work. For example, if you record the steps to create a WordArt object that contains the following text
We're the "Wright" Solution!the recorded code may look similar to the following:
ActiveSheet.Shapes.AddTextEffect(msoTextEffect3, _ "We're the "Wright" Solution!", "Arial", 18.00, msoFalse, _ msoFalse, 69.75, 166.50).SelectNote that the word "Wright" is enclosed in quotation marks.
RESOLUTIONTo resolve this problem, add an additional set of quotation marks around the text that you want to appear in quotation marks. For example, change the sample code to the following:
ActiveSheet.Shapes.AddTextEffect(msoTextEffect3, _ "We're the ""Wright"" Solution!", "Arial", 18.00, msoFalse, _ msoFalse, 69.75, 166.50).SelectNote the second set of quotation marks around the word "Wright."
STATUSMicrosoft has confirmed this to be a problem in the Microsoft 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.
|
Additional query words: XL98
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |