The information in this article applies to:
SYMPTOMSWhen you record a Microsoft Visual Basic Programming System, Applications Edition macro command, and the ExecuteExcel4Macro method is recorded, you may receive a syntax error when you run the macro. CAUSE
A few commands in Microsoft Excel must be recorded using the
ExecuteExcel4Macro method because there is no equivalent command in Visual
Basic. If the recorded command uses the ExecuteExcel4Macro method, the
command may be placed onto two or more physical lines using the line
continuation character (_).
This command will cause a syntax error when you run the macro because the
ExecuteExcel4Macro argument is split across lines. Because the
ExecuteExcel4Macro argument is a string, it must be contained all on one
line.
WORKAROUNDWhen you use the ExecuteExcel4Macro command, type the command all on one line. If you record a macro, and a line continuation character is incorrectly inserted in the ExecuteExcel4Macro command, delete any line continuation characters in the command so that the command is all on one line. STATUS
Microsoft has confirmed this to be a problem in the versions of Microsoft
Excel listed at the beginning of this article. This problem was corrected
in Microsoft Excel 97 for Windows and Microsoft Excel 98 Macintosh Edition.
REFERENCESFor more information about the ExecuteExcel4Macro Method, choose the Search button in Help and type: Excel 4.0: macro sheets Additional query words: 5.00a 5.00c 7.00a XL7 XL5
Keywords : kbprg PgmOthr |
Last Reviewed: October 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |