logo
search
VBA & Macro Problems

Fix PowerPoint VBA Stops Working After Saving and Reopening

Huda QurayshiHuda Qurayshi Oct 22, 2026 868 views

Question details

PowerPoint VBA macros fail to execute, disappear, or are blocked by security settings after saving and reopening a presentation.

How to Fix PowerPoint VBA Stops Working After Saving and Reopening
Product
Microsoft PowerPoint
Device & OS
not provided
Scenario
A user creates or modifies VBA code in a PowerPoint presentation, saves the file, and later reopens it only to find that the macros no longer function or have completely disappeared.
Observed behavior
The VBA code either vanishes entirely from the Visual Basic Editor due to incorrect file formatting or is blocked from running by the application's Trust Center security policies.
Before you start

Before troubleshooting, press Alt + F11 to open the Visual Basic Editor and check if your VBA code is still present; this will help determine if the issue is a file format problem or a security block.

Solution 1Recommended

Save as a Macro-Enabled Presentation (PPTM)

Saving your presentation in the correct macro-enabled format ensures that your VBA code is not stripped from the file upon saving.

If you save a presentation containing VBA code as a standard PPTX file, PowerPoint will automatically remove the macros. To preserve your code, the file must be saved with the PPTM extension.

1
Open Save As

Click on 'File' in the top-left corner of PowerPoint and select 'Save As' from the sidebar menu.

2
Change File Type

Click the file format dropdown menu below the file name input box.

3
Select PPTM Format

Choose 'PowerPoint Macro-Enabled Presentation (*.pptm)' from the list of available formats.

4
Save the File

Click 'Save'. If you previously lost your code by saving as a PPTX, you will need to paste the VBA script back into this new PPTM file.

Save as a Macro-Enabled Presentation (PPTM)
Code Recovery: Once a file is saved as PPTX and closed, the VBA code cannot be recovered from that file. You must re-insert the code from a backup or re-write it in the new PPTM file.

Run Presentation Macros Seamlessly with WPS Office

If strict macro security settings or format compatibility issues are disrupting your workflow, WPS Office offers a powerful, user-friendly environment. WPS Presentation fully supports PPTM formats and provides an intuitive VBA editor, allowing you to run your presentation macros effortlessly.

  1. 1. Install WPS Office: Download and install the free version of WPS Office from the official website.
  2. 2. Open Your PPTM File: Launch WPS Presentation and open your macro-enabled (.pptm) presentation.
  3. 3. Enable Macros: If prompted by the security warning at the top of the screen, click 'Enable Macros'.
  4. 4. Run Your Code: Navigate to the 'Tools' tab, click on 'Macros', and execute your VBA scripts without complex Trust Center hurdles.
Fully compatible with Microsoft PowerPoint (.pptm) files and VBA macros.Built-in, easy-to-navigate VBA editor for quick scripting adjustments.Lightweight architecture ensures fast loading and processing.Free to use with a familiar interface that requires zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why did my VBA code completely disappear after reopening the presentation?

If your VBA code vanishes, it is almost always because the file was saved with the standard .pptx extension. The PPTX format does not support macros and automatically strips all VBA code upon saving. You must save the file as a Macro-Enabled Presentation (.pptm).

Is it safe to simply enable all macros in PowerPoint to fix this issue?

No, it is highly discouraged to select 'Enable all macros' in the Trust Center. Doing so leaves your computer vulnerable to malicious code embedded in files downloaded from the internet. Using 'Trusted Locations' is the recommended and secure alternative.

How do I bypass the 'Disable all macros except digitally signed macros' policy?

You cannot bypass this setting if it is enforced by your organization's IT department via Group Policy. To run your macros, you must either digitally sign the VBA project using a corporate certificate or save the file in a designated network Trusted Location approved by your administrator.

Can I use animations instead of VBA for simple text formatting?

Yes. Depending on what your VBA code is designed to do, built-in PowerPoint features like animations applied to preformatted text boxes can often achieve the same visual result without triggering macro security warnings.