What code can I use to stop VBA from processing when the user selects the Cancel button option in the InputBox?
Sub RefreshPT()
‘
‘ RefreshPT Macro
‘
Sheets(“Control”).Activate
Range(“B2”).Select
UserValue = InputBox(“Enter Date in MM/dd/yyyy format”)
Range(“B2”).Value = UserValue
Sheets(“DaySum”).Select
ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
End Sub