Dialog.Show メソッド (Word)
表示され、指定した Word の組み込みダイアログ ボックスで開始アクションを実行します。 長 を示す、ダイアログ ボックスを閉じますクリックしてされたボタンを返します。
構文
式。Show( _TimeOut_
)
expression 必須です。 'Dialog' オブジェクトを表す変数。
パラメーター
名前 | 必須 / オプション | データ型 | 説明 |
---|---|---|---|
タイムアウト | 省略可能 | バリアント型 (Variant) | ダイアログ ボックスが自動的に閉じるまでの時間を指定します。 基本の単位は約 0.001 秒です。 システム アクティビティを同時に実行すると、有効時間の値が増えます。 この引数を省略した場合、ユーザーがダイアログ ボックスを閉じたときにダイアログ ボックスは閉じます。 |
戻り値
Long
注釈
Show メソッドが返す値の意味を次の表に示します。
戻り値 | 説明 |
---|---|
-2 | [ 閉じる] ボタン。 |
-1 | [ OK] ボタン。 |
0 (ゼロ) | [ キャンセル] ボタン。 |
> 0 (zero) | コマンド ボタン。1 は 1 番目のボタン、2 は 2 番目のボタンに対応します。 |
例
This example displays the Find and Replace dialog box with the word "Blue" preset in the Find what text box.
With Dialogs(wdDialogEditFind)
.Find = "Blue"
.Show
End With
This example displays and carries out any action initiated in the Open dialog box. ファイル名 は に設定 され、すべてのファイル名が表示されます。
With Dialogs(wdDialogFileOpen)
.Name = "*.*"
.Show
End With
This example displays and carries out any action initiated in the Zoom dialog box. If there are no actions initiated for approximately 9 seconds, the dialog box is closed.
Dialogs(wdDialogViewZoom).Show TimeOut:=9000
関連項目
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。