Search

VBA Msgbox


Msdn-->https://goo.gl/LKksp2



'-----------------------------
'Thanks for downloading the code. 
'Please visit our channel for a quick explainer on this code.
'Feel free to update the code as per your need and also share with your friends.
'Channel: Youtube.com/vbaa2z
'Download free codes from http://vbaa2z.blogspot.com
'Autor: L Pamai (vbaa2z.team@gmail.com)
'-----------------------------

Option Explicit

Sub test1()
    MsgBox "This is hi from Excel", vbInformation, "VBAa2z"
End Sub


Sub test2()
    MsgBox "An error occured", vbCritical, "VBAa2z"
End Sub

Sub test3()
    
'Visit: Youtube.com/VBAa2Z
'Re-use and change it as you like
'10:26 PM 2/12/2017
'by LP (vbaa2z@outlook.com)
'---------------------------------

    Dim userResp As String
    
    userResp = MsgBox("Are you sure the file is ready to be loaded?", vbYesNo, "Please confirm")
    
    If userResp = vbYes Then
        MsgBox "user clicked on Yes"
        'cont...
        
        Else
        MsgBox "user clicked on No"
        'exit
        End
        Exit Sub
        
    End If    
End Sub

No comments:

Post a Comment

Note: only a member of this blog may post a comment.