Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Defining worksheet specific range names

I have the following in a macro

ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange

This works to define workbook names. Is it possible to define a worksheet
specific name? I have the sheet name defined as "sht" and am wondering what
I need to change if it can be done.

Thanks in advance,
Barb Reinhardt


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Defining worksheet specific range names

Barb,

I believe to specify a local sheet name, you simply have to preface the
rangename string with the sheet name and an exclamation point.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"Barb Reinhardt" wrote:

I have the following in a macro

ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange

This works to define workbook names. Is it possible to define a worksheet
specific name? I have the sheet name defined as "sht" and am wondering what
I need to change if it can be done.

Thanks in advance,
Barb Reinhardt


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Defining worksheet specific range names

Like so

worksheets("Sheet1").names.add name:="Jim",refersto:=range("A1:B1")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Barb Reinhardt" wrote in message
...
I have the following in a macro

ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange

This works to define workbook names. Is it possible to define a

worksheet
specific name? I have the sheet name defined as "sht" and am wondering

what
I need to change if it can be done.

Thanks in advance,
Barb Reinhardt




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
Specific location to register the worksheet names of a workbook Fanny Excel Discussion (Misc queries) 5 September 29th 07 07:10 AM
Defining Named Range for Lastrow in a specific column Barb Reinhardt Excel Discussion (Misc queries) 5 May 9th 07 08:55 PM
Defining Range within Specific Dates Cardan Excel Worksheet Functions 0 July 26th 06 08:17 PM
Defining non worksheet specific names... Steve Excel Worksheet Functions 0 June 29th 05 05:30 AM
Delete Specific Range Names Larry[_11_] Excel Programming 3 December 22nd 03 09:48 PM


All times are GMT +1. The time now is 12:58 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"