How To View PowerPoint Add-in VBA Code Inside Visual Basic Editor
Where Did My Code Go?
That was the question I was asking myself when I first began to create PowerPoint add-ins for my own personal use. With much research, I came to the realization that PowerPoint doesn’t like to show VBA code associated with presentation files that are of the add-in format. Luckily I was able to find a very simple workaround to this problem that will at least let you view your add-in code in real-time while in PowerPoint.
I found these steps through Shyam Pillai’s PowerPoint MVP website and I want to thank him for sharing this and a bunch of other great PowerPoint tips on his site.
Modifying Your Registry
- Close down PowerPoint
- Go to your Start Menu and find your Run application (the easiest way is to type ‘Run’ in your search box)
- Type in Regedit.exe and click OK
- Navigate to the following key in the registry tree*: HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options
- Find the key name DebugAddins. If you do not see it you will need to create it (steps for this are shown in the next section)
- Double click on DebugAddins and in the window that pops up ensure the DWORD value is 1 and click OK
- Launch PowerPoint and go into your Visual Basic Editor (Alt+F11). You will now be able to see any PowerPoint add-in VBA code that is currently running
*Note that the 15.0 may be a different number based on the Office version you are running (12.0 is Office 2007, 14.0 is Office 2010)
How To Create the DebugAddins Key
More than likely you are not going to have the DebugAddins key created in your Options folder, so you are going to have to create one. Make sure immediately after you create the new DWORD value that you rename it DebugAddins. Once the name is set there is no way to modify it (if have the wrong name, just right-click on the name and delete the line item, then start over). Below are the steps you will need to take to create your registry key.
And You’re Done Messing With The Registry!
Confirm that you have the proper name, type, and data values in your line item and you are done! Now you can start up your PowerPoint application and you will be able to see your VBA add-in projects inside the PowerPoint Visual Basic Editor. Note you will not be able to save changes made to the add-in code. If you need to make changes you will either have to modify your original PowerPoint Macro-enabled file that you used to create the add-in or you can make a new PowerPoint project and save it as a new add-in file.
After 10+ years of creating macros and developing add-ins, I've compiled all the hacks I wish I had known years ago!
Add Line Breaks In Screentips & SuperTips (Ribbon XML)
Parts Of A Ribbon Button’s Tool Tip Programatically, there are two parts to a button’s tool tip box that appears...
How To Run Personal VBA Macros in Microsoft PowerPoint
PowerPoint Is Not Excel! I have spent probably 90% of my Microsoft Office usage inside Excel. Because of this, I...
Chris is a finance professional and Excel MVP recognized by Microsoft since 2016. With his expertise, he founded TheSpreadsheetGuru blog to help fellow Excel users, where he shares his vast creative solutions & expertise. In addition, he has developed over 7 widely-used Excel Add-ins that have been embraced by individuals and companies worldwide.