Try this:


Option Explicit
 
Sub Test()
Dim Selectedarea    As Range
Dim MyErr           As Long
On Error Resume Next
    Set Selectedarea = Application.InputBox(prompt:="Select the cell/range...", _
    Title:="SWITCH CELL SELECTION", Default:=Selection.Address, Type:=8)
    MyErr = Err
    On Error GoTo 0
    If MyErr <> 0 Then
        MsgBox "You press Cancel, this procedure will now terminate."
        Exit Sub
    End If
MsgBox Selectedarea.Cells.Count 'Change to do what you want if Cells.Count = 1
End Sub