View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default 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.