Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Input Box with Cancel Button

The below code allows you to identify whether user cancelled while getting input

frmdate1 = InputBox("Enter From Date (DD-MMM-YYYY)")

If frmdate1 = vbNullString Then

    MsgBox "Action Cancelled", vbCritical, "User Cancelled"

    Exit Sub

End if


Enter your e-mail below and get notified on the latest blog posts.


VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts

Follow Us