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: 361
Default Macro to name ranges for selected worksheets

I am using the macro below:

Sub maketable()

Set SheetList = ActiveWindow.SelectedSheets
For Each sh In SheetList
sh.Activate

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:=Application.InputBox("Enter Table Name"),
RefersToR1C1:= _
"=throttling20051222!R19C2:R97C6"

Next sh

End Sub

I need to change this part -

RefersToR1C1:= "=throttling20051222!R19C2:R97C6"

so that the new name refernences the selected worksheet.

Is it possible ?

Thank you in advance.

 
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
Macro to work only on selected worksheets [email protected] Excel Discussion (Misc queries) 3 January 22nd 07 07:14 PM
Run A Macro On Selected Worksheets Carl Excel Worksheet Functions 2 August 31st 06 06:27 PM
Modify a Macro to Repeat for all Selected Worksheets carl Excel Worksheet Functions 2 January 12th 06 04:56 PM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM
Help: Macro to to sum across selected visible worksheets maimai Excel Programming 1 April 28th 04 09:02 AM


All times are GMT +1. The time now is 01:53 AM.

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"