The Finishing Touches

Adding a Description to your Macros

This does not have to be done when you record the macro and can easily be done afterwards.
You can add a Description to your macro by selecting (Tools > Macro > Macros) and selecting the "Options" button at the bottom.
If you add a description before recording a macro then this description will appear as a comment on the first few lines of the recorded VBA code.

Adding a Shortcut to your Macros

It is not possible to create shortcut keys for your macros in PowerPoint however there is an add-in available.
This add-in allows you to assign shortcut keys to your menu items, recorded macros and VBA Code.
For more information please refer to the <A TARGET="_BLANK" HREF="" TITLE="Shortcut Manager for PowerPoint"></A> website.

Public vs Private

All procedures and Public by default.
To prevent a macro or procedure from appearing in the (Tools > Macro > Macros) dialog box you can change the scope from Public to Private.
It is always a good habit to explicitly state whether public or private to avoid any confusion.

Using the Status bar

If you switch the ScreenUpdating off to prevent the screen from flickering it is worth using the Status bar to keep the user informed about the current status of the macro.
If your macro takes a bit of time to complete using the status bar will ensure that the user does not think that the macro has crashed or is not responding.

   ' Make sure that the status bar is visible
Application.DisplayStatusbar = True

' Enter the message to be displayed
Application.Statusbar = "Please wait .."

' **** Add Your Code Here ****

' When the macro has finished reset the status bar
Application.Statusbar = False

If you change the status bar to display a message to the user - make sure you reset it.

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext