Skip to content

Instantly share code, notes, and snippets.

@ndthanh ndthanh/HeoMsgBoxExcelVBA.bas Secret
Created Oct 6, 2019

Embed
What would you like to do?
Sub HeoBasicMessageBox()
MsgBox "Xin chao cac ban da den voi Hoc Excel Online"
End Sub
Sub HeoBasicMessageBoxWithTitle()
MsgBox "Xin chao cac ban da den voi Hoc Excel Online", , "HEO"
End Sub
Sub HeoBasicMessageBox2()
MsgBox "Hoc Excel Online", _
vbOKCancel + _
vbCritical + _
vbDefaultButton1 + _
vbApplicationModal
End Sub
Sub HeoBasicMessageBox3()
MsgBox "Hoc Excel Online", _
vbOKCancel + _
vbCritical + _
vbDefaultButton1 + _
vbSystemModal
End Sub
Sub HeoMsgBoxResult1()
Dim response As VbMsgBoxResult
response = MsgBox("Hoc Excel Online", vbYesNo + vbCritical)
MsgBox response
End Sub
Sub HeoMsgBoxResult2()
Dim response As VbMsgBoxResult
response = MsgBox("Hoc Excel Online", vbYesNo + vbQuestion)
MsgBox response
End Sub
Sub HeoMsgBoxResult3()
Dim response As VbMsgBoxResult
response = MsgBox("Hoc Excel Online", vbYesNo + vbExclamation)
MsgBox response
End Sub
Sub HeoMsgBoxResult4()
Dim response As VbMsgBoxResult
response = MsgBox("Hoc Excel Online", vbYesNo + vbInformation)
MsgBox response
End Sub
Sub HeoMsgBoxResult5()
Dim response As VbMsgBoxResult
response = MsgBox("Error", vbAbortRetryIgnore + vbDefaultButton1 + vbMsgBoxHelpButton)
MsgBox response
End Sub
Sub HeoMsgBoxResult6()
Dim response As VbMsgBoxResult
response = MsgBox("Error", vbAbortRetryIgnore + vbDefaultButton2 + vbMsgBoxHelpButton)
MsgBox response
End Sub
Sub HeoMsgBoxResult7()
Dim response As VbMsgBoxResult
response = MsgBox("Error", vbAbortRetryIgnore + vbDefaultButton3 + vbMsgBoxHelpButton)
MsgBox response
End Sub
Sub HeoMsgBoxResult8()
Dim response As VbMsgBoxResult
response = MsgBox("Error", vbAbortRetryIgnore + vbDefaultButton4 + vbMsgBoxHelpButton)
MsgBox response
End Sub
Sub HeoMsgBoxResult9()
Dim response As VbMsgBoxResult
response = MsgBox("Want to try again?", vbRetryCancel + vbQuestion, "Error")
MsgBox response
End Sub
Sub HeoMsgBoxResult10()
MsgBox "Critical error occurred", vbCritical, "System Error"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.