How to: User selected range?
Never mind, I got it:
Sub servient()
Dim r As Range
Set r = Application.InputBox(Prompt:="Select range", Type:=8)
ThisWorkbook.Names.Add Name:="MyNameRange", _
RefersTo:=r, Visible:=True
End Sub
Phil Smith wrote:
Still no joy. Runs without errors, but MyRangeName is not being updated
to reflect the choice...
Gary''s Student wrote:
Sub servient()
Dim r As Range
Set r = Application.InputBox(Prompt:="Select range", Type:=8)
Set MyRangeName = r
MyRangeName.Select
End Sub
|