How do I control the cell reference when naming a cell in a macro

G

Guest

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top