Creating Macros with VB Code in PowerPoint


How to create a macro with Visual Basic language in PowerPoint? PowerPoint supports Visual Basic for Applications (VBA). Can I create a macro with Visual Basic to display a simple message box?



Yes, you can easily create a macro with Visual Basic for Applications in 4 steps:

1. Click the Developer tab. You see the Developer tab menu showing up.

2. Click the Macros icon. You see the Macro dialog box showing up.

3. Enter "HelloMacro" in the Macro name field. Then click the Create button. You see the Microsoft Visual Basic window showing up.

4. Enter the following programming code and close the Visual Basic window:

Sub HelloMacro()
MsgBox "Hello there! Welcome to Website!" & _
" Do you like this presentation?", vbYesNoCancel, _
"Survey Question"
End Sub


Testing Macros without Slide Show in PowerPoint

Saving PowerPoint with Macros in *.pptm Format

Programming Macro Code in PowerPoint

⇑⇑ MS PowerPoint - Frequently Asked Questions

2016-10-26, 1847👍, 0💬