» Change the state of a custom CommandBar button using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY - Menus, Toolbars, Status bar in VBA
VERSION - All Microsoft Excel Versions
Sub ToggleButtonState()
Dim m As CommandBarControl
Set m = CommandBars("CommandBarName").Controls(1)
If m.State = msoButtonDown Then
m.State = msoButtonUp
Else
m.State = msoButtonDown
End If
Set m = Nothing
End Sub
Book Store:
Recommended Books:
- Excel 2002 Power Programming with VBA
- Marketing Planning for Services
- Investing for Dummies, Third Edition
- Successful Business Planning in 30 Days: A Step-By-Step Guide for Writing a Business Plan and Starting Your Own Business
- Financial Statement Analysis with S&P insert card
- Understanding Financial Statements
No comments have been submitted.


