Working with toolbar buttons
This is a simple demonstration of how you can access toolbar buttons and change their properties.
Sub EnableDisableButtons()
' Demonstrates a few things you can do to control button appearance/behavior
Dim MyButton As CommandBarButton
' Edit this to supply the actual names of your toolbar and button
'Set MyButton = CommandBars("ToolbarName").Controls.Item("ButtonName")
' For example, the Bold button on the Formatting toolbar
Set MyButton = CommandBars("Formatting").Controls.Item("Bold")
MyButton.Enabled = False
MsgBox "The button should now be grayed out/disabled. We'll re-enable it when you click OK."
MyButton.Enabled = True
End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.