A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Using Type:=8 you get a Range object or Nothing, where Nothing means the user want to abort the procedure.
Andreas.
Sub Test()
Dim UserXRange As Range
On Error Resume Next
Set UserXRange = Application.InputBox("X Input Range", "X Input", Selection.Address(0, 0), Type:=8)
If UserXRange Is Nothing Then
'Aborted
Exit Sub
End If
On Error GoTo 0
'Rest of your code here
End Sub