Thread: Change Event
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jan Kronsell Jan Kronsell is offline
external usenet poster
 
Posts: 99
Default Change Event

I'm using the Worksheet_Change Event to put som information in Column D if
changes happens i Column C.

If I type ie anything in C3, "ABC" is added in D3. I Can later Delete the
"ABC" manually. This works perfectly allrigt. My problem is, that if I
Delete the contents og C3 then I do not want D3 to change. So is thefre a
way I can check if the change is a Clearcontent. I've tried with

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 And Target.ClearContents = True Then
Exit Sub
Else
If Target.Column = 3 Then
If Range("D" & Target.Row) = "" Then
Range("D" & Target.Row) = Range("INITIALER").Value
End If
End If
End If
End Sub


But that makes anything types i Columsn C to be deleted.

Jan