User-Defined Type Not Defined compile error when creating PowerPoint using VBA in Excel

MsManzy

New Member
Joined
Jul 29, 2014
Messages
3
I am using Microsoft Excel 2010 and Microsoft VBA 7.0 on my system. I would like to eventually create a PowerPoint and insert charts generated in the Excel workbook. In the meantime, I cannot get the basic PowerPoint created.

The line in red is highlighted blue when the compile error "User-defined type not defined" message box appears.

Public Sub TryAgain()
Dim myPowerPoint As PowerPoint.Application
'
' do nothing for now
'​
End Sub
I have set the references such that Microsoft Project 14.0 Object Library is indeed checked. The Excel file only contains this code in a module. All sheets are blank. Nothing else is written yet.

I am probably missing something, so direction would be most helpful. If more information is required, please let me know.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hello MsManzy
Have you set the reference for Microsoft PowerPoint 14.0 Object Library?
 
Upvote 0
Yes, I have set the reference. Any ideas? I have tried again in a brand new workbook and it still doesn't work.
 
Upvote 0
Hiya
The only time I have come across that error is when a reference has not been set.
The only other thing I can suggest is to try a repair, go to Control Panel\All Control Panel Items\Programs and Features then right click on Microsoft Office & select repair
Depending on the type of installation, you may need a system disc
 
Upvote 0
I did right-click on my Microsoft Office program in control panel, and there was not an option to repair. Thanks for the help. I did not get it working, but I will try again with a brand new workbook.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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