on Calculation event

G

grievesy

Is there such a thing as onCellupdate. I am using Worksheet_Calculate(
but my actions within that create new data and so keep looping. Is i
posible to react to just the change of data on one cell.

I am using RTD from another application and so data change often.

Please help if you can.
 
J

JE McGimpsey

You can stop the looping by wrapping your code with
Application.Enableevents:

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
'Do stuff
Application.EnableEvents=True
End Sub
 
K

keepitcool

Put this in the worksheets' object codemodule:

Private Sub Worksheet_Change(ByVal Target As Range)

'this will trigger within specified range
If Target.Count = 1 And Intersect(Target, Me.Range("a30:c300")) Then
'temporarily prevent triggering further events
Application.EnableEvents = False
Target.Cells(1, 1) = Target.Cells(1, 2)
Application.EnableEvents = True
End If

End Sub


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Top