CommandBar.Visible プロパティ (Office)

取得またはコマンド バーの Visible プロパティを設定します。 True コマンド バーが表示される場合。 読み取り/書き込みが可能です。

注:

[!メモ] 一部の Microsoft Office アプリケーションにおける CommandBars の使用方法が、Microsoft Office Fluent ユーザー インターフェイスの新しいリボン コンポーネントによって置き換えられました。 詳細については、「Office Fluent リボンの概要」を参照してください。

構文

表示

CommandBar オブジェクトを表す変数。

戻り値

Boolean

注釈

Visible プロパティに対して、カスタム コマンド バーを新規に作成された False 既定です。

Visible プロパティが True に設定する前に、コマンド バーの [ 使用可能 ] プロパティを True に設定しなければなりません。

This example steps through the collection of command bars to find the Forms command bar. If the Forms command bar is found, the example makes it visible and protects its docking state.

foundFlag = False  
For Each cmdbar In CommandBars 
    If cmdbar.Name = "Forms" Then 
        cmdbar.Protection = msoBarNoChangeDock 
        cmdbar.Visible = True  
        foundFlag = True  
    End If 
Next 
If Not foundFlag Then 
    MsgBox "'Forms' command bar is not in the collection." 
End If

関連項目

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。