+ Reply to Thread
Results 1 to 3 of 3

How to List Named-Ranges only from specific Sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2010
    Location
    Rio de Janeiro
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to List Named-Ranges only from specific Sheet

    Hi all!

    Still having trouble with ranges...
    I can't seem to get right a way to run through Named Ranges that belong to only a given Sheet...and then do stuff to them.
    Any ideas??

    '--------sub beg-------------
    Sub LoopThruRanges()
    
    Dim rng_names As Variant
    Dim n As Variant
    
    
    Set rng_names = ThisWorkbook.Names
    
    
    For Each n In rng_names
     With Sheets("OnlyforThisSheet")
             MsgBox n   'debug
     End With
    Next
    
    End Sub
    '--------sub end---------------
    Thanks!
    Last edited by aefavant; 05-12-2010 at 10:57 AM.

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: How to List Named-Ranges only from specific Sheet

    Please put [CODE ] [ /CODE] tags around your code.
    you didn't do it in your previous post, and you didn't do it now.

    Read the forum rules

  3. #3
    Registered User
    Join Date
    05-10-2010
    Location
    Rio de Janeiro
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to List Named-Ranges only from specific Sheet

    You are right, am sorry.
    Fixed it now.
    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1