+ Reply to Thread
Results 1 to 3 of 3

Using Named Range in Worksheet_Change event

Hybrid View

Guest Using Named Range in... 07-11-2006, 03:40 PM
Guest RE: Using Named Range in... 07-11-2006, 03:45 PM
Guest Re: Using Named Range in... 07-11-2006, 04:25 PM
  1. #1
    Barb Reinhardt
    Guest

    Using Named Range in Worksheet_Change event

    I have the following IF statement in my worksheet_Change event

    If Not Intersect(Target, Range("A1:A20")) Is Nothing Then


    I'd like to replace "A1:A20" with a named range. What do I need to change
    to get this to work. Let's say the named range is "BARB" for this example.

    Thanks,
    Barb Reinhardt

  2. #2
    Jim Thomlinson
    Guest

    RE: Using Named Range in Worksheet_Change event

    try this...

    If Not Intersect(Target, Range("BARB")) Is Nothing Then
    --
    HTH...

    Jim Thomlinson


    "Barb Reinhardt" wrote:

    > I have the following IF statement in my worksheet_Change event
    >
    > If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
    >
    >
    > I'd like to replace "A1:A20" with a named range. What do I need to change
    > to get this to work. Let's say the named range is "BARB" for this example.
    >
    > Thanks,
    > Barb Reinhardt


  3. #3
    Bob Phillips
    Guest

    Re: Using Named Range in Worksheet_Change event

    Private Sub Worksheet_Change(ByVal Target As Range)

    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("BARB")) Is Nothing Then
    With Target
    'do your stuff
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Barb Reinhardt" <BarbReinhardt@discussions.microsoft.com> wrote in message
    news:5B23BB35-FF53-44F7-ACFC-C4B935541BF2@microsoft.com...
    > I have the following IF statement in my worksheet_Change event
    >
    > If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
    >
    >
    > I'd like to replace "A1:A20" with a named range. What do I need to

    change
    > to get this to work. Let's say the named range is "BARB" for this

    example.
    >
    > Thanks,
    > Barb Reinhardt




+ 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