View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
glenn glenn is offline
external usenet poster
 
Posts: 122
Default How do I control the cell reference when naming a cell in a macro

When recording a macro that creates or defines a range name for a cell, I can
programantically get to the cell I want, but the recorded macro adds a fixed
reference (see example below) that I'd like to control without using a
combination of numeric and string variables. I'd like to create the name
using an active cell reference. Is this possible?

ActiveWorkbook.Names.Add Name:="TOT", RefersToR1C1:="=PgrmPvtName!R4C38"