View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default VBA Code to name a variable range

Hi,

I have a macro to create charts. Problem is that the source data is variable
by lenght....could be between 10-15 rows. Columns are always constant.

I can't use the code
ActiveWorkbook.Names.Add Name:="RangeName", RefersTo:=Selection
because you have to specify the cell refs.

Any ideas please?