Pass arguments to macros from buttons and menus using VBA in Microsoft Excel

The example below shows how you can create CommandBar buttons/menus that passes one or more arguments to a macro. the example also shows how you can ...

Edit the tooltip for toolbarbuttons using VBA in Microsoft Excel

The examples below uses the New-button on the Standard toolbar as an example. You can replace "Standard" with the name or number of another CommandBa...

Display a CommandBar centered on the screen using VBA in Microsoft Excel

With the macro below, you can display a CommandBar centered on the screen, both horizontally and vertically. The macro also shows how you can get the...

Determine which CommandBar button that started a macro using VBA in Microsoft Excel

Let the macros themselves determine which CommandBar button that started them. If you attach the macro below to multiple CommandBar buttons, the mess...

Change the state of a custom CommandBar button using VBA in Microsoft Excel

The macro below shows how you can change the state of a custom CommandBar button so it displays as depressed or not. Sub ToggleButtonState() Dim m A...

Change the availability for the shortcut menus using VBA in Microsoft Excel

The macro below shows how you can toggle the availability state for the shortcut menus. Sub ToggleCommandBars() Dim cbEnabled As Boolean cbEnab...

Change the availability for the CommandBars using VBA in Microsoft Excel

With the macro below you can toggle the availability of the Workbook Menu Bar,the Standard toolbar and a custom CommandBar. The first time you run th...

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On Youtube