Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Marco command to name a range?

I'm trying to create a macro command that will create a range name for
a range that is set by the end - right - end - down process (since the
dimensions will change each time it's run) I'm sure it's easy, but
I'm just a rookie at this.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Marco command to name a range?

if you turn on the macro recorder
do what you want to do
and then turn it off
and then look at the code it produced, it will give you some ideas of
how to set the range.
then you can name the range.
hth
susan


On Apr 4, 7:52 am, wrote:
I'm trying to create a macro command that will create a range name for
a range that is set by the end - right - end - down process (since the
dimensions will change each time it's run) I'm sure it's easy, but
I'm just a rookie at this.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Marco command to name a range?

Dim rng As Range
Set rng = Range(ActiveCell, ActiveCell.End(xlToRight))
Set rng = Range(rng, rng.End(xlDown))
rng.Name = "myName"


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
ups.com...
I'm trying to create a macro command that will create a range name for
a range that is set by the end - right - end - down process (since the
dimensions will change each time it's run) I'm sure it's easy, but
I'm just a rookie at this.



Reply
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
Adjusting To Current Row Range in Marco tmdrake Excel Discussion (Misc queries) 0 May 19th 08 09:19 PM
Marco and command buttons sarasotavince Excel Programming 1 January 8th 06 02:36 AM
How to assign a marco to a command button Eric Excel Worksheet Functions 1 May 30th 05 12:44 AM
How can i assign a marco to a command button Chip Pearson Excel Programming 0 May 30th 05 12:24 AM
activate marco command Dominic Mak Excel Programming 2 April 10th 05 01:32 PM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"