I am using the below code to select a range, how would I then name this range so that I can refer to it later in my macro?


[[Sub ReplaceTitleMs()
Dim rng As Range
Set rng = Application.InputBox("Select a range", "Obtain Range Object", Type:=8)

MsgBox "The cells selected were " & rng.Address

End Sub]]

Thank you.

Z