View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How to: User selected range?

Sub servient()
Dim r As Range
Set r = Application.InputBox(Prompt:="Select range", Type:=8)
Set MyRangeName = r
MyRangeName.Select
End Sub

--
Gary''s Student - gsnu200821


"Phil Smith" wrote:

Nope. It runs with no errors, but the cells covered by that range do
not change to the selected cells. The range remains the same...


Gary''s Student wrote:
Sub servient()
Dim r As Range
Set r = Application.InputBox(Prompt:="Select range", Type:=8)
Set MyRangeName = r
End Sub