Inputbox - Cell/Range selection - Nothing selected or Cancel
I have the following code to ask the user to select a cell or range.
Code:
'Ask for selection
Set SelectedArea = Application.InputBox(prompt:="Select the cell/range...", _
Title:="SWITCH CELL SELECTION", _
Default:=Selection.Address, Type:=8)
How do handle it when the user clicks the Cancel button or doesn't select anything?
:confused:
Also, is there any other way to tell if a single cell was selected or if a range was selected other than using
Code:
SelectedArea.Rows.Count
SelectedArea.Columns.Count
Thanks!