i have a range whose value is changed realtime but the onchange module does nothing if value is changed by other module for that range. however if i change value manually it works. code :-
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim lastRow As Long
Dim cell As Range
If Not Intersect(Target, Range("J10:J43")) Is Nothing Then
Application.EnableEvents = False
For Each cell In Target
If cell.Value < cell.Offset(0, 4).Value Then
cell.Offset(0, 7).Value = cell.Offset(0, 1).Value
'Module1.OnGenOrder
End If
Next cell
End If
Application.EnableEvents = True
End Sub
NOTE:- i think module Private Sub Worksheet_Change(ByVal Target As Range) is not able to sense changes. The value is changed by a module in another external .xla file. but a change by simple formulas like =a1+b1 works well
update
this is code of cell to monitor
=c:\Excelmacros\updateprice.xla!dataupdate($H12,"price1")