Toolbar Problem Access 2003

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
cbb.Enabled = Action

Try placing a doEvents right after the above line of code....

Also, if using a2003, try testing with themes turned off.
 
I placed a Doevents as you suggested. I won’t know for a few days if it
solves the problem or not seeing how the problem was intermittent in the
first place. But I am hopeful.

I appreciate the help!
 
Back
Top