Share via

VBA Code Repair for Excell

Kathleen Moore 0 Reputation points
2026-05-14T21:38:06.13+00:00

Trying to create a QuickBooks certified payroll report that is opened in Excel. We have been able to pull these reports until we updated QuickBooks today as requested by QuickBooks. The following error comes up:

Compile error in hidden module: cpInterview.

I need the correct VBA code in Excell to open these reports. Can you please provide a repair?!

Microsoft 365 and Office | Excel | Other | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 89,490 Reputation points MVP Volunteer Moderator
    2026-05-14T22:18:19.04+00:00

    This doesn't look like a “missing VBA code” problem. “Compile error in hidden module: cpInterview” likely means Excel is trying to load a QuickBooks/Intuit payroll add-in (or template macro module) that was compiled for a different Excel version, is missing a required library reference, or is being blocked after the QuickBooks update. Because the module is hidden, you cannot repair it by editing the workbook code directly in most cases.

    After QuickBooks updates, a common cause is that the Certified Payroll Excel export template or the cpInterview add-in is incompatible with your current Office build (32-bit vs 64-bit Excel, or an Office update that broke a referenced library).

    The actual repair is usually to stop Excel from loading the broken module and then reinstall or re-register the QuickBooks Excel export components.

    First, try opening Excel without any QuickBooks add-ins loading, then re-save or regenerate the report from QuickBooks. You can also force Excel to open a file while disabling macros so the broken module does not compile:

    Application.AutomationSecurity = msoAutomationSecurityForceDisable
    Workbooks.Open Filename:="C:\Path\YourReport.xlsm"
    

    If the file opens with macros disabled, that confirms the problem is inside the QuickBooks macro module, not your workbook structure.

    The actual fix is typically removing the QuickBooks add-in/template and reinstalling it or repairing Office references. In Excel, you'd go into VBA editor (Alt+F11), then Tools > References, and look for anything marked “MISSING”. If you see a missing library, unchecking it and repairing Office usually resolves the compile error.

    If the issue started immediately after updating QuickBooks, reinstalling the QuickBooks Desktop Payroll components (or the Certified Payroll Excel reporting tool) might fix the issue.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.