H
Hennie Neuhoff
Hi All,
The following code returns an error if the user doesn’t select a
range, with the error message "The formula you typed contains
an error."
Any assistance would be much appreciated.[Excel 2003]
Public Sub TestError()
Dim cellsSelected As Range
On Error Resume Next
Set cellsSelected = _
Application.InputBox(prompt:="Select a cell range", _
Type:=8)
On Error GoTo 0
If cellsSelected Is Nothing Then Exit Sub
End Sub
The following code returns an error if the user doesn’t select a
range, with the error message "The formula you typed contains
an error."
Any assistance would be much appreciated.[Excel 2003]
Public Sub TestError()
Dim cellsSelected As Range
On Error Resume Next
Set cellsSelected = _
Application.InputBox(prompt:="Select a cell range", _
Type:=8)
On Error GoTo 0
If cellsSelected Is Nothing Then Exit Sub
End Sub