I have the following code to clear the contents of a cell based on user input. I want to exit the sub if the Cancel button is clicked but I get an Object Required error. Any help would be terrific. Thanks.
[VB]
Dim rInput As Range
Dim sAddress As String
Set rInput = Application.InputBox _
(Prompt:="Enter the Cell Address of the points you wish to delete ... e.g. C2:", _
Title:="Delete Points", Type:=8)
If rInput = "" Then
MsgBox ("You have not entered a Cell Address. Please try again.")
Exit Sub
End If
sAddress = rInput.Address
Range(sAddress).ClearContents
[/VB]