Dear experts,
i have two separate worksheet_change events which i want to use on the same sheet.
it seems per sheet only worksheet_change event can work,
so to overcome this issue i have to somehow combine them
any suggestions ?
the 1st
and this is the 2nd
thanks a lot !
Regards Desmond
i have two separate worksheet_change events which i want to use on the same sheet.
it seems per sheet only worksheet_change event can work,
so to overcome this issue i have to somehow combine them
any suggestions ?
the 1st
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Fnd As Range
If Target.CountLarge > 1 Then Exit Sub
If Not Target.Column = 3 Then Exit Sub
Application.EnableEvents = False
Set Fnd = Rows(1).Find(Target.Value, , xlValues, xlWhole, , , False, , False)
If Not Fnd Is Nothing Then Target.Offset(, Fnd.Column - 3) = "x"
Application.EnableEvents = True
End Sub
and this is the 2nd
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo msg
Dim KeyCells As Range
Set KeyCells = Range("H18:BO205")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If Target.Value = "x" Then
Cells(Target.Row, Target.Column + 1).Value = 2
Cells(Target.Row, Target.Column - 1).Value = 2.5
End If
End If
LetsContinue:
Application.EnableEvents = True
Exit Sub
msg:
MsgBox "insert is out of range"
Resume LetsContinue
thanks a lot !
Regards Desmond