Results 1 to 4 of 4

When does Names.RefersToRange Property Fail?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-09-2010
    Location
    Constanta
    MS-Off Ver
    Excel 2007
    Posts
    128

    When does Names.RefersToRange Property Fail?

    Greetings,

    I have created a dynamic name range called "Test" that refers to

    =OFFSET(Test!$G$1,1,0,COUNTA(Test!$G:$G)-1,1)
    I refer to this range in my code using the syntax

    Names("Test").RefersToRange
    This works fine except when "Test" does not refer to a range, ie all cells are blank. I would like to know if there is anything else that will cause the "RefersToRange" property to fail. If not, then I plan to use this code when an error occurs

    If Err.Number <> 0 Then
       MsgBox "The list contains no data"
       Exit Sub
    Thanks a lot
    Asha

    N.B. Due to the monsoons, the internet connection is unstable so may not be able to respond promptly to any follow up questions.
    Last edited by asha3010; 07-22-2010 at 09:07 AM.

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