MsgBox 定数MsgBox constants
次の定数は、コード内の任意の場所で実際の値の代わりに使用できます。The following constants can be used anywhere in your code in place of the actual values.
MsgBox の引数MsgBox arguments
定数Constant | 値Value | 説明Description |
---|---|---|
vbOKOnlyvbOKOnly | .00 | [ OK ] ボタンのみ (既定値)OK button only (default) |
vbOKCancelvbOKCancel | 1-d1 | [OK] ボタンと [キャンセル] ボタンOK and Cancel buttons |
vbAbortRetryIgnorevbAbortRetryIgnore | pbm-22 | [ 中止 ]、[ 再試行 ]、[ 無視 ] の各ボタンAbort, Retry, and Ignore buttons |
vbYesNoCancelvbYesNoCancel | 1/33 | [ はい ]、[ いいえ ]、[ キャンセル ] の各ボタンYes, No, and Cancel buttons |
vbYesNovbYesNo | 2/44 | [ はい ] ボタンと [ いいえ ] ボタンYes and No buttons |
vbRetryCancelvbRetryCancel | 55 | [ 再試行 ] ボタンと [ キャンセル ] ボタンRetry and Cancel buttons |
vbCriticalvbCritical | 1616 | 重大なメッセージCritical message |
vbQuestionvbQuestion | 3232 | 警告クエリWarning query |
vbExclamationvbExclamation | 4848 | 警告メッセージWarning message |
vbInformationvbInformation | 6464 | 情報メッセージInformation message |
vbDefaultButton1vbDefaultButton1 | .00 | 1 番目のボタンが既定 (既定値)First button is default (default) |
vbDefaultButton2vbDefaultButton2 | 256256 | 2 番目のボタンが既定Second button is default |
vbDefaultButton3vbDefaultButton3 | 512512 | 3 番目のボタンが既定Third button is default |
vbDefaultButton4vbDefaultButton4 | 768768 | 4 番目のボタンが既定Fourth button is default |
vbApplicationModalvbApplicationModal | .00 | アプリケーションのモーダル メッセージ ボックス (既定値)Application modal message box (default) |
vbSystemModalvbSystemModal | 40964096 | システムのモーダル メッセージ ボックスSystem modal message box |
vbMsgBoxHelpButtonvbMsgBoxHelpButton | 1638416384 | メッセージ ボックスに [ヘルプ] ボタンを追加するAdds Help button to the message box |
VbMsgBoxSetForegroundVbMsgBoxSetForeground | 6553665536 | メッセージ ボックス ウィンドウを手前のウィンドウにするSpecifies the message box window as the foreground window |
vbMsgBoxRightvbMsgBoxRight | 524288524288 | テキストを右揃えにするText is right aligned |
vbMsgBoxRtlReadingvbMsgBoxRtlReading | 10485761048576 | ヘブライ語とアラビア語のシステムでテキストが右から左に読む形式で表示されるようにするSpecifies text should appear as right-to-left reading on Hebrew and Arabic systems |
MsgBox の戻り値MsgBox return values
定数Constant | 値Value | 説明Description |
---|---|---|
vbOKvbOK | 1-d1 | [ OK ] ボタンが押されたOK button pressed |
vbCancelvbCancel | pbm-22 | [ キャンセル ] ボタンが押されたCancel button pressed |
vbAbortvbAbort | 1/33 | [ 中止 ] ボタンが押されたAbort button pressed |
vbRetryvbRetry | 2/44 | [ 再試行 ] ボタンが押されたRetry button pressed |
vbIgnorevbIgnore | 55 | [ 無視 ] ボタンが押されたIgnore button pressed |
vbYesvbYes | シックス6 | [ はい ] ボタンが押されたYes button pressed |
vbNovbNo | 77 | [いいえ] ボタンが押されたNo button pressed |
関連項目See also
サポートとフィードバックSupport and feedback
Office VBA またはこの説明書に関するご質問やフィードバックがありますか?Have questions or feedback about Office VBA or this documentation? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.