「Excel VBA」メッセージボックスのサンプル

2021年7月27日

1.中止、再試行、無視ボタン

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Sub funcA()
Dim val As Integer
val = MsgBox("hello", vbAbortRetryIgnore + vbInformation)
Debug.Print val
End Sub
Sub funcA() Dim val As Integer val = MsgBox("hello", vbAbortRetryIgnore + vbInformation) Debug.Print val End Sub
Sub funcA()
    Dim val As Integer
    val = MsgBox("hello", vbAbortRetryIgnore + vbInformation)
    Debug.Print val 
End Sub

2.informationのアイコン

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Sub funcA()
MsgBox "hello", vbInformation
End Sub
Sub funcA() MsgBox "hello", vbInformation End Sub
Sub funcA()
      MsgBox "hello", vbInformation
End Sub

3.はてなのアイコン

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Sub funcA()
MsgBox "hello", vbQuestion
End Sub
Sub funcA() MsgBox "hello", vbQuestion End Sub
Sub funcA()
      MsgBox "hello", vbQuestion
End Sub

4.ばつ印のアイコン

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Sub funcA()
MsgBox "hello", vbCritical
End Sub
Sub funcA() MsgBox "hello", vbCritical End Sub
Sub funcA()
      MsgBox "hello", vbCritical
End Sub

 

VBScript

Posted by arkgame