SAP Knowledge Base Article - Public

2378937 - "Compile error" when opening a converted BEx workbook in Excel 64 bit

Symptom

The error below occurs when opening a converted BEx Workbook in Excel 64 bit:

"Compile error:
The code in this project must be updated for use on 64-bit systems.
Please review and update Declare statements and then mark them with the PtrSafe attribute."

Compile error.png

Environment

SAP BusinessObjects Analysis, edition for Microsoft Office

Reproducing the Issue

  1. Convert a BEx workbook in Analysis for Office;
  2. Open the converted workbook in Excel 64 bit with Macro enabled (it is not even necessary to have AO installed on the machine);
  3. Confirm the "Compile error".

Cause

The error occurs because there is VBA code used in the workbook which can not be used in a 64 bit version of Excel.
VBA coding is ignored during the conversion process in Analysis for Office and no changes are done.

Resolution

The VBA code needs to be revisited and checked.

  1. Convert the BEx workbook in Analysis for Office 32 bit;
  2. Open it with Analysis for Office and check the result
  3. Perform any cleanup of VBA code that has been introduced by the BEx Analyzer or custom code.

This converted workbook can be opened by a 32 bit or 64 bit version of Analysis for Office without any issue.

This specific "Compile error" can also be fixed by updating the declarations in VBA code with "PtrSafe". Refer to Microsoft's documentation.

Keywords

Compile error, compile, PtrSafe, 64 bit, converted, workbook, convert, BEx, vba, macro , KBA , BI-RA-AO-XLA , Excel Addin , How To

Product

SAP Analysis for Microsoft Office all versions