Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In previous Excel versions I was able to define a constant in a Name and
assign it to a specific spreadsheet. This is for VBA coding which defines the action based on the type of spreadsheet that is active. I cannot assign a spreadsheet specific Name constant within Excel 2003 unless I am missing something. Attempted to use the Name Add-in Manager from this site but receive an "On-Click" error so the add-in will not load. How do I assign the same Name Range to specific spreasheets. For example, I need a Name Range for every spreadsheet with in the workbook entitled "SheetType" each spreadsheet will have a different constant assigned to that Name. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark,
Don't have 2003 so I cannot be sure, but I would be surprised if this were not possible. Did you create it like so worksheets("Sheet2").Range("A1").Name = "Sheet2!Bob" and Sheet1, etc. -- HTH RP (remove nothere from the email address if mailing direct) "Mark" wrote in message ... In previous Excel versions I was able to define a constant in a Name and assign it to a specific spreadsheet. This is for VBA coding which defines the action based on the type of spreadsheet that is active. I cannot assign a spreadsheet specific Name constant within Excel 2003 unless I am missing something. Attempted to use the Name Add-in Manager from this site but receive an "On-Click" error so the add-in will not load. How do I assign the same Name Range to specific spreasheets. For example, I need a Name Range for every spreadsheet with in the workbook entitled "SheetType" each spreadsheet will have a different constant assigned to that Name. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark,
In previous Excel versions I was able to define a constant in a Name and assign it to a specific spreadsheet. This is for VBA coding which defines the action based on the type of spreadsheet that is active. I cannot assign a spreadsheet specific Name constant within Excel 2003 unless I am missing something. Attempted to use the Name Add-in Manager from this site but receive an "On-Click" error so the add-in will not load. Could you send the error message to the address listed on my website please? How do I assign the same Name Range to specific spreasheets. For example, I need a Name Range for every spreadsheet with in the workbook entitled "SheetType" each spreadsheet will have a different constant assigned to that Name. Precede the name with the name of the worksheet. If e.g. the worksheet is named Sheet 1 and the name is Name01, use this name: 'Sheet 1'!Name01 as the name of the name. Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another way via code:
Option Explicit Sub testme() Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets With wks .Names.Add Name:="MyRng", RefersTo:=.Range("a1:b9") End With Next wks End Sub Mark wrote: In previous Excel versions I was able to define a constant in a Name and assign it to a specific spreadsheet. This is for VBA coding which defines the action based on the type of spreadsheet that is active. I cannot assign a spreadsheet specific Name constant within Excel 2003 unless I am missing something. Attempted to use the Name Add-in Manager from this site but receive an "On-Click" error so the add-in will not load. How do I assign the same Name Range to specific spreasheets. For example, I need a Name Range for every spreadsheet with in the workbook entitled "SheetType" each spreadsheet will have a different constant assigned to that Name. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merging data from several Excel 2010 spreadhseets | Excel Discussion (Misc queries) | |||
Merging data from several Excel 2010 spreadhseets | New Users to Excel | |||
Help: vlookup from multiple sheets and spreadhseets | Excel Worksheet Functions | |||
Match data of two identical strings in two separate spreadhseets | Excel Discussion (Misc queries) | |||
why do check boxes move when printing excel spreadhseets | Excel Discussion (Misc queries) |