Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone give me an example showing code to add a name to the names
collection and to assign the name to a range reference such as, "mynamesfile.xls!customername" Thanks, Keith |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Keith,
I though that I had - in response to you other posts in the Excel group. --- Regards, Norman "keithb" wrote in message ... Can someone give me an example showing code to add a name to the names collection and to assign the name to a range reference such as, "mynamesfile.xls!customername" Thanks, Keith |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The first instance add the name MyNameRange to range A1 to E5, if you need
to do this under program control it might be easier to use the second version that specifies the row and column numbers (also range A1 to E5)....., prefix the Range with Worksheets("MySheet") if it is not on the active sheet. ActiveWorkbook.Names.Add Name:="MyNameRange", _ RefersTo:=Range("A1:E5") ActiveWorkbook.Names.Add Name:="MyNameRange", _ RefersTo:=Range(Cells(1, 5), Cells(5, 5)) -- Cheers Nigel "keithb" wrote in message ... Can someone give me an example showing code to add a name to the names collection and to assign the name to a range reference such as, "mynamesfile.xls!customername" Thanks, Keith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
assign file numbers to names | Excel Discussion (Misc queries) | |||
Assign charts names in VBA? | Excel Discussion (Misc queries) | |||
Assign names to R1C1 referencing | Excel Programming | |||
Adding Range to Worksheet Names Collection | Excel Programming | |||
Names Collection | Excel Programming |