LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Syntax - Add Range Name based on Selection

What is the proper syntax for adding the name "Area1" in
this case, based on a selection of the active cell,
xldown. I recorded it but of course it recorded actual
R1C1 of the range at the time. That doesn't work since the
range will vary in size each time it is run.

So, I need to go something like this.

ActiveWorkbook.Names.Add Name:="AREA1" _
Range.(Selection, Selection.End(xlDown))

Thanks,


Bruce
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a range of rows based on a variable; syntax error Babymech Excel Discussion (Misc queries) 3 January 16th 09 06:19 PM
Correct Syntax for Changing Color of Cell Based on Value W Excel Discussion (Misc queries) 3 December 6th 08 10:39 PM
Excel 2003 VBA Range selection based on system date [email protected] Excel Discussion (Misc queries) 0 December 3rd 08 10:33 PM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"