「Excel VBA」メッセージボックスのタイトル、ボタンを表示するサンプル
1.メッセージボックスのタイトル
Sub funcA()
MsgBox("hello", vbOKCancel + vbInformation, "test title")
End Sub
2.はい、いいえボタンを表示
Sub funcA()
Dim res As Integer
res = MsgBox("hello", vbYesNo + vbInformation)
Debug.Print res
End Sub
3.はい、いいえ、キャンセルボタンを表示
Sub funcA()
Dim nn As Integer
nn = MsgBox("hello", vbYesNoCancel + vbInformation)
Debug.Print nn
End Sub