Quote Originally Posted by Karl77 View Post
A question to the toolbar:

I have a toolbar with several buttons.
All the buttons have the Style = TbrButtonStyleDefault.
In some place of the code I toggle the values of the buttons, like
Code:
.tlb_All.Buttons("xxx").Value = TbrButtonValuePressed.
This works ok, the button shows a pressed state.

I can also get the value of the button, tested with a command button:
Code:
Debug.Print "PressedState:", tlb_All.Buttons("xxx").Value
Works as well.

Now when I click a button, before any action, I want to get the state as well.
But inside the tlb_All_ButtonClick event, always 0 is seen.
Regardless of the current value.

What can this be, or how can I get the value inside the ButtonClick event?
That it is normal. The behavior is the same as in the original MS ToolBar.
The ButtonClick is fired when the mouse is released, so the button state is unpressed as this moment.
Only when the Style is for instance set to TbrButtonStyleCheck then it remains pressed within the ButtonClick and Value will be TbrButtonValuePressed.