Change the Range of a Name

  • Thread starter Thread starter Hölzl Otto
  • Start date Start date
H

Hölzl Otto

Is There a possibility, to change the Range of a name-dependent of the value
of a Variable(perhaps Startrow rsp. Endrow)-with with a VBA-statement?
Thank you for a good hint!
 
dim Startrow as long
dim endrow as long

with activesheet
.range(.cells(startrow,"B"),.cells(endrow,"c")).name = "myName"
end with

if myName already exists, this'll reassign it. If it didn't exist, it'll get
created.

(Did I misunderstand the question?)
 
Back
Top