Give CurrentRegion a RangeName

  • Thread starter Thread starter clr
  • Start date Start date
C

clr

Hi All.......

I would like to select a cell with code, say B14, and then be able to assign
a RangeName to it's "Current Region" without having to use cell references
for the Range because I never know how big the range will be for the
selected cell.

Any help would be appreciated.

Vaya con Dios,
Chuck, CABGx3
 
Sub NameThatRegion()
Dim r As Range
Set r = ActiveCell.CurrentRegion
r.Name = "alphaa"
End Sub
 
Why vector through the variable?

Sub NameThatRegion()
ActiveCell.CurrentRegion.Name = "alpha"
End Sub
 
Back
Top