Sub RangeFlag()
Dim rng1 As Range
On Error Resume Next
Set rng1 = Application.InputBox("Please confirm user selected range", , Range([m5], Cells(Rows.Count, "M").End(xlUp)).Address, , , , , 8)
On Error GoTo 0
If Not rng1 Is Nothing Then
'do something
Else
MsgBox "user cancelled", vbCritical
End If
End Sub