I use the following snippet of code to prompt the user to type in a range from a message box which then becomes a named range in my spreadsheet. How can I alter the code to have the user select the range with his mouse instead of having to type it in the message box?
Any help would be much appreciated. Banjoe.
Code:
SpecifiedRange = InputBox("Specifiy the range to be named: 'Table'")
Range(SpecifiedRange).Select
MsgBox "This is the range you selected"
SpecifiedRange = Selection.Address
ActiveWorkbook.Names.Add Name:="Table", _
RefersTo:="=" & SpecifiedRange
Any help would be much appreciated. Banjoe.