Excel freezes when trying to open PowerPoint App

Kelvin Stott

Active Member
Joined
Oct 26, 2010
Messages
338
Hi, I have a large VBA macro that creates a PowerPoint file, copying and pasting various tables and charts from Excel into slides. Most of the time the macro works perfectly fine, but occasionally it runs into a problem:

1. Occasionally the macro crashes and is forced to terminate for whatever reason, however this problem is rare and occurs only in special cases, so I can figure out why and fix it later.

2. Once the macro crashes as in 1 above, it stops working completely in ALL cases, even after I close or terminate Excel and PowerPoint, reopen the Excel file and try to run the macro again in cases where the bug in 1 above never occurs. Specifically, it freezes (without reporting any error) at the following line of code which otherwise never causes any problems:

VBA Code:
Set ppApp = CreateObject("PowerPoint.Application")

I can only get the macro to work again if I restart the computer, so it seems that the first bug is causing some permanent change in the system memory or settings, which remains after Excel and PowerPoint are closed and is only reset by restarting the computer.

Has anyone experienced anything like this? Any ideas on what setting or other piece of information may be stored outside the Excel and Powerpoint applications to cause this problem? Is there any VBA code I could add to check and restore the correct default settings to make sure the above line of code works as it should in all cases?

I did spend a couple of hours searching the forums for any clues but could not find anything that helps.

Thanks for any help.
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top