I am trying simply to select a range with Application.InputBox method. It does ask to select the range and correctly specify it in a pop up window, but in reality it selects only the active cell (see two attached screen shorts, MsgBox shows number of selected counts). What is wrong?
I work with Excel 2007 on WinXP.
Thank you very much in advance!
The code is :
===================================
Public Sub ProblemWithInputBox()
Dim UserRange As Range
Prompt = "Select one column range to make list of categories"
Title = "Select a range"
On Error Resume Next
Set UserRange = Application.InputBox( _
Prompt:=Prompt, _
Title:=Title, _
Type:=8)
On Error GoTo 0
MsgBox Selection.Count
End Sub
=================================
Bookmarks