SAP Knowledge Base Article - Public

2534828 - "Compile error: Syntax error" occurs when opening workbook in Analysis for Office


When opening a workbook in Analysis for Office which contains macros, the error below occurs:

syntax error.png


SAP BusinessObjects Analysis, edition for Microsoft Office


This error is not related to Analysis for Office, but to Excel. It occurs whenever there is a syntax error in the macros/VBA code.


Check and debug the VBA code in the workbook, to find the line where the syntax is not correct.

For example, depending on the quote character used in the code, the error might occur for some users using Excel in a different language. As shown below:

Application.Run(SAPGetProperty, IsConnected, DataSourceName) The quote character here can cause the "syntax error" for users using Excel in a different language (e.g. Korean)
Application.Run("SAPGetProperty", "IsConnected", DataSourceName)   This is the character that should be used to avoid the "syntax error"


syntax, error, compile, vba, code, workbook, report, opening, excel, visual studio , KBA , BI-RA-AO-XLA , Excel Addin , Problem


SAP Analysis for Microsoft Office all versions