Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the error? When you click on the "Debug" in the error window, what
line of code is highlighted? Otto "rbanks" wrote in message ... Tom, Otto, I have tried both of you suggestions, and they both error out. ![]() Tom's Sub addnames() Dim v As Variant, i As Long Dim sh As Worksheet v = Array("Domestic CSCs", "Toronto CSC", "Vancouver CSC", "Winnipeg CSC", _ "Calgary CSC", "Montreal CSC", "Halifax CSC", "Canadian DPS", "Anchorage CSC", _ "Atlanta", "Boston CSC", "Chicago CSC", "Cincinnati CSC", "Denver CSC", _ "Houston CSC", "Kansas City -CSC", "Los Angeles CSC", "Memphis CSC", _ "Minneapolis CSC", "San Jose CSC", "Philadelphia CSC", "Phoenix-CSC", _ "Pittsburgh-CSC", "Pontiac-CSC", "Portland CSC") For i = LBound(v) To UBound(v) Set sh = Worksheets(v(i)) sh.Range("A1:N256").Name = v(i) Next End Sub Otto's Sub NameRngs() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh Range("A1:N253").Name = sh.Name End With Next sh End Sub -- rbanks ------------------------------------------------------------------------ rbanks's Profile: http://www.excelforum.com/member.php...fo&userid=2944 View this thread: http://www.excelforum.com/showthread...hreadid=526217 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Named Range Into a Cell | Excel Worksheet Functions | |||
Insert Named Range using Excel Macro | Excel Programming | |||
INSERT into named range using ADO | Excel Programming | |||
Insert named range problem | Excel Programming | |||
Macro for copying named range to any sheet | Excel Programming |