'ActiveWorkbook.Names.Add Name:' how to make range variable?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Data is coming into a worksheet, and from a macro, I determine the range
using Selection.CurrentRegion.Select, I then .Add Name, but the macro is
setting the range. I want the range to change each time the macro is run.
 
Hard to say what the problem is without seeing your code.

Perhaps

Range("A1").CurrentRegion.Name = "Data1"
 

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

Back
Top