Previous  Home  Next

Set up PowerPoint and the Visual Basic Editor

Before you start to write VBA code in PowerPoint, you'll want to set up PowerPoint itself and the VBA Editor (also known as the Integrated Development Environment or IDE) correctly. Here's how:

Display the VB Toolbar

the visual basic toolbar

The VB Toolbar has buttons to:

Security Settings

powerpoint's security settings

Note: If you choose Medium, PowerPoint alerts you whenever it opens a presentation that includes VBA code (macros) and lets you choose to enable the code or not.

If you choose Low, PowerPoint enables the code without asking. Bad choice if you get presentations from people you don't know and trust. If there are macros in them, you'll want some warning.

If you choose High or Very High, your code will be disabled. Bad choice if you're writing code.

Visual Basic Editor (IDE)
Start a new blank presentation. PowerPoint stores VB code in PPT files so it won't let you open the VB Editor unless there's a presentation open.

Start the VB Editor

the visual basic editor or I.D.E.

Yours will only show one "project" in the Project window on the left instead of the zillions of them you see here. That's normal.

visual basic editor options dialog box

visual basic general options dialog box

The Editor Format tab contains options for text formatting in the IDE.
The Docking tab has options for the way the various IDE windows dock to one another.
Explore them if you like, but we're not concerned with their settings.

Finally, choose View, Toolbars and put a check next to Edit and Debug. The Edit and Debug toolbars will appear. Drag them by the title bar until they dock under the VB Editor's main menu bar, in the same area as the Standard toolbar. It should look something like this:

visual basic editor with standard, debug and edit toolbars docked

But you didn't come here to learn to set up a code editor, you came to learn how to make code, right?

So click Next to move on to the next section and we'll do just that.

Previous  Home  Next