Planning Analytics

 View Only

 RefreshBook displays an error message

Anis AZIZI's profile image
Anis AZIZI posted Mon May 12, 2025 06:19 AM

Hi everyone,

I'm currently using the PAfE (Planning Analytics for Excel) Add-in to manage a workbook that includes quick and dynamic reports. To refresh the reports, I've set up an action button that triggers a VBA macro executing the following line:

  • Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer.Application("COR", "1.1").RefreshBook

However, some users are encountering the following error when they click the button:

"Variable objet ou variable de bloc With non définie"
(Object variable or With block variable not set)

What’s puzzling is that all users have the same version of Excel, PAfE, and other related software. This issue has been occurring for over two years now, and unfortunately, IBM Support has not been able to provide a solution.

If anyone has encountered a similar problem or has any suggestions, your help would be greatly appreciated.

Thanks in advance!

George Tonkin's profile image
George Tonkin IBM Champion

HI Anis,

Have you tried going into the macro settings in the Trust Center in Excel and ticking the "Trust access to the VBA project object model"?

Anis AZIZI's profile image
Anis AZIZI

Hi George,

Yes, I did try enabling the "Trust access to the VBA project object model" in the Trust Center macro settings, but unfortunately it didn’t work.

Let me know if you have any other suggestions!

Best regards,
Anis