Results 1 to 6 of 6

Named Range not being accepted

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,056

    Named Range not being accepted

    I am trying to add in a named range. If I step through the macro, the named range gets added in. If I run the macro, it doesn't. The line is in the code below. I first had it in the "Filter1A" macro, which among other things puts in the data that the named range is going to refer to. It wasn't working there, so I've tried moving it around. I can't find the problem! Help!
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim Cell As Range
    
        If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
    
        Application.ScreenUpdating = False
        'Here's trouble
        For Each Cell In Target
            If Cell.Address = "$E$1" Then
                Application.EnableEvents = False
                Range("E2:J2").ClearContents
                Range("E3:I3").ClearContents
                Application.EnableEvents = True
                Filter1A
                ThisWorkbook.Names.Add Name:="PertPacs2", RefersTo:="=OFFSET(Temp!$A$1,0,0,COUNTA(Temp!$A:$A),1)"
                Exit Sub
    Last edited by jomili; 10-11-2011 at 12:54 PM.

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