Shows the selection state of an item.
Use a ToggleButton to show whether an item is selected. If a ToggleButton is bound to a data source, the ToggleButton shows the current value of that data source as either Yes/No, True/False, On/Off, or some other choice of two settings.
If the user selects the ToggleButton, the current setting is Yes, True, or On; if the user does not select the ToggleButton, the setting is No, False, or Off.
If the ToggleButton is bound to a data source, changing the setting changes the value of that data source. A disabled ToggleButton shows a value, but is dimmed and does not allow changes from the user interface.
You can also use a ToggleButton inside a Frame to select one or more of a group of related items. For example, you can create an order form with a list of available items, with a ToggleButton preceding each item. The user can select a particular item by selecting the appropriate ToggleButton.
The default property of a ToggleButton is the Value property. The default event of a ToggleButton is the Click event.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.