Thread
:
Address of selected range
View Single Post
#
10
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Address of selected range
Another using your original criteria
Sub namerng()
Range("j2", Range("j2").End(xlDown).End(xlToRight)).Name = "hi"
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"vandenberg p" wrote in message
...
I have the following VBA code (it was recorded):
dim chrtrng as range
Range("j2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
set chrtrng = selection.address
~~~~~~~
I now wish to know how to assign that range a name.
The above set does not work and I can't quite figure the
correct way to do this.
Thanks for any help.
Pieter
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett