Thread: Calculate Event
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Bauer Martin Bauer is offline
external usenet poster
 
Posts: 6
Default Calculate Event

good morning,

I have a big excel spread with a lot of different vba functions and
volitale functions

I would just like to add function that in a specified cell every second the
value of the cell is increasing by 1.

My problem is that as soon I add the function


Private Sub Worksheet_Calculate()
Application.OnTime Now + TimeValue("00:00:01"), "zahl"
End Sub


Public i

Sub zahl()
i = i + 1
Cells(5, 5) = i
End Sub

The spreadsheet is not updating every second but maybe every millisecond

Is there a way that the Worksheet_Calculate() is only trigger if the
specified cell is changed ??

Best Regards
Ciao
Martin