» 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:
- PowerPoint® 2002 For Dummies®
- Mastering Excel 2000 (for beginner)
- Definitive Guide to Excel VBA
- Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!
- Financial Statement Analysis: A Practitioner's Guide, 3rd Edition
- Special Edition Using Microsoft Excel 2002
No comments have been submitted.

