Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBS for excel named ranges
What will be the vba code to display all the "name" (text) of the named
ranges and its reference range it refers to. I am trying to create some thing like this For each rname in Activeworkbook.names.count msgbox "name is: " & rname.name & "it refers to: " & rname.range next Please help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBS for excel named ranges
Sub nameit()
For Each nm In ActiveWorkbook.Names MsgBox (nm.Name & " " & Range(nm).Address) Next End Sub -- Gary''s Student - gsnu200786 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBS for excel named ranges
You don't need the .Range after rname. And drop the .count in the For Each.
For each rname in Activeworkbook.names msgbox "name is: " & rname.name & "it refers to: " & rname next "mario" wrote: What will be the vba code to display all the "name" (text) of the named ranges and its reference range it refers to. I am trying to create some thing like this For each rname in Activeworkbook.names.count msgbox "name is: " & rname.name & "it refers to: " & rname.range next Please help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBS for excel named ranges
And if you're working with names, get Jan Karel Pieterse's (with Charles
Williams and Matthew Henson) Name Manager: You can find it at: NameManager.Zip from http://www.oaltd.co.uk/mvp You'll find it very valuable. mario wrote: What will be the vba code to display all the "name" (text) of the named ranges and its reference range it refers to. I am trying to create some thing like this For each rname in Activeworkbook.names.count msgbox "name is: " & rname.name & "it refers to: " & rname.range next Please help. -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBS for excel named ranges
mario -
It may be an interesting exercise to "reinvent the wheel" using VBA, but Excel does already have a menu item for this feature. In Excel 2003 and earlier versions, choose Insert | Name | Paste | Paste List. In Excel 2007, choose Formulas | (Defined Names) Use in Formula | Paste Names | Paste List. - Mike Middleton http://www.DecisionToolworks.com Decision Analysis Add-ins for Excel "mario" wrote in message ... What will be the vba code to display all the "name" (text) of the named ranges and its reference range it refers to. I am trying to create some thing like this For each rname in Activeworkbook.names.count msgbox "name is: " & rname.name & "it refers to: " & rname.range next Please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... | Excel Programming | |||
union of named ranges based only on the names of those ranges | Excel Programming | |||
Copy data in named ranges to a newer version of the same template to identical ranges | Excel Programming | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
VB.Net DLL Using Excel Named Ranges | Excel Programming |