View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 'ActiveWorkbook.Names.Add Name:' how to make range variable?

Hard to say what the problem is without seeing your code.

Perhaps

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

--
Regards,
Tom Ogilvy


"TeeSea" wrote in message
...
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.