Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default on Calculation event

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.

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default on Calculation event

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



In article ,
grievesy wrote:

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 it
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..


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default on Calculation event



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


grievesy wrote:

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 it
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..


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default on Calculation event

Thanks everyone - i now have it working.

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a rounded calculation result in another calculation? vnsrod2000 Excel Worksheet Functions 1 January 26th 05 09:36 PM
Event Procedures: Event on Worksheet to fire Event on another Worksheet Kathryn Excel Programming 2 April 7th 04 07:35 PM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM
range.calculation with UDF not working when calculation is set to automatic Brian Murphy Excel Programming 5 October 14th 03 07:02 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"