Skip to main content

CommandBars.GetPressedMso method

Returns a value indicating whether the toggleButton control identified by the idMso parameter is pressed.

Syntax

expression.GetPressedMso (idMso)

expression An expression that returns a CommandBars object.

Parameters

Name Required/Optional Data type Description
idMso Required String Identifier for the control.

Return value

Boolean

Example

The following sample returns True when the Bold button is chosen.

Application.CommandBars.GetPressedMso("Bold")

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>