G
Guest
I have a user develop toolbar in which I enable / disable certain Command Bar
Buttons based upon the state of various application objects. And all works
reasonably well with the exception of the random times after I have enabled a
button the button doesn’t light up. If you move the mouse across the button
it does light up! You don’t even have to click on it. Just moving the mouse
across it does the trick.
Is this just an Office bug? There doesn’t seem to be any rhyme or reason to
it. Any workaround? Any thoughts?
Below is a portion of the routine I use to enable/disable
Public Sub Set_Toolbar_Enabled(Action As Boolean)
Dim CBR As CommandBar
Dim cbb As CommandBarButton
Set CBR = CommandBars("MyToolBar")
Set cbb = CBR.Controls("MyButton")
cbb.Enabled = Action
Buttons based upon the state of various application objects. And all works
reasonably well with the exception of the random times after I have enabled a
button the button doesn’t light up. If you move the mouse across the button
it does light up! You don’t even have to click on it. Just moving the mouse
across it does the trick.
Is this just an Office bug? There doesn’t seem to be any rhyme or reason to
it. Any workaround? Any thoughts?
Below is a portion of the routine I use to enable/disable
Public Sub Set_Toolbar_Enabled(Action As Boolean)
Dim CBR As CommandBar
Dim cbb As CommandBarButton
Set CBR = CommandBars("MyToolBar")
Set cbb = CBR.Controls("MyButton")
cbb.Enabled = Action