Fire Macro from Cell Change
Hi,
I have got this code from another thread in my search for a solution to
a cell firing a macro.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
If Not Intersect(Target, Range("f27")) Is Nothing Then
For Each myCell In Intersect(Target, Range("f27"))
If myCell.Value < 90 Then
Call Rockwell_AddC
End If
If myCell.Value = " " Then
Call Rockwell_RemoveC
End If
If k27 < 90 And f27 < 90 Then
MsgBox "Fire" 'Call Rockwell_Both
End If
Next myCell
End If
End Sub
I have a third condition (Rockwell_both) that I want to be able to call
when both k27 and f27 have a number in them less than 90, but it seems
to only see the f27 as the keycell as determined by the Target, Range
at the beginning of the code.
I have put a MSGBox in to debug, but rem out the actual macro call.
Can anyone help with this one?
Cheers,
Aaron.
|