Creating range name for a range selection

M

Mervyn Thomas

My existing code is a bit predetermined as in the example:

ActiveWorkbook.Names.Add Name:="CodeLookup",
RefersToR1C1:="=CostCodes!R1C2:R200C8"

I can't figure out how to change this to refer to the current region
selection such as:

ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1;= current
selection

Mervyn
 

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