×

How To View PowerPoint Add-in VBA Code Inside Visual Basic Editor

By Chris Newman •  Updated: 11/06/14 •  3 min read
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

  1. Close down PowerPoint
  2. Go to your Start Menu and find your Run application (the easiest way is to type 'Run' in your search box)
  3. Type in Regedit.exe and click OK
  4. Navigate to the following key in the registry tree*: HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options
  5. 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)
  6. Double click on DebugAddins and in the window that pops up ensure the DWORD value is 1 and click OK
  7. 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)

iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps
iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps
iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps

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.

iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps
iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps
iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps

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.

iew Microsoft PowerPoint Add-in VBA macro code - Modify Registry Steps

Keep Learning

Chris Newman

Chris Newman

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.