ToolBar buttons by name?

  • Thread starter Thread starter Tom Williams
  • Start date Start date
T

Tom Williams

Surely there must be some way to refer to a button on a
toolbar by its name.

I don't mean when the button is clicked, I can see how to do
that.

Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.

I'm not yet sure how many buttons I'll have and what order
they'll be in. So, if I have to hard code their index
number, adding, deleting or rearranging buttons will be a
pain in the toolbar.

tia
Tom
 
* Tom Williams said:
Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.

\\\
Me.ToolBarButton5.Enabled = False
///
 
Back
Top