+ Reply to Thread
Results 1 to 2 of 2

help with stupid (simple) error

  1. #1
    mark kubicki
    Guest

    help with stupid (simple) error

    why isn't this assigning the value (i'm tired, it's late, and i'm just
    missing the obvious... blah, blah, blah)

    If Not Intersect(Target, Me.Range("c14:c23")) Is Nothing Then 'Exit Sub
    With Target
    If Target.Offset(0, -1).Value = "" Then
    Range(Target.Offset(0, -1)).Value = "1"
    End If
    End With
    End If




  2. #2
    Jim Cone
    Guest

    Re: help with stupid (simple) error

    mark,

    I cleaned it up a little...
    '-------------------------
    Private Sub Worksheet_Change(ByVal Target As Range)
    On Error GoTo NoChange
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("C14:C23")) Is Nothing Then
    If Target.Offset(0, -1).Value = "" Then Target.Offset(0, -1).Value = "1"
    End If
    NoChange:
    Application.EnableEvents = True
    End Sub
    '------------------

    Jim Cone
    San Francisco, USA


    "mark kubicki" <[email protected]> wrote in message
    news:[email protected]...
    why isn't this assigning the value (i'm tired, it's late, and i'm just
    missing the obvious... blah, blah, blah)

    If Not Intersect(Target, Me.Range("c14:c23")) Is Nothing Then 'Exit Sub
    With Target
    If Target.Offset(0, -1).Value = "" Then
    Range(Target.Offset(0, -1)).Value = "1"
    End If
    End With
    End If




+ 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