View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Run macro when when changing cell value with formula.

You can't stop the caculate event from running, but you can use another cell
to determine if the data has been written.

Set cell A1 to False before starting the timer


In the calculate function do this

if Range("A1") = false

if Range("E28") < timevalue("00:00:30") then
'enter you copy code here
Range("A1") = True
end if
end if
"Kollijonke" wrote:

Hi.
I am running a workbook that getting it´s values from a different program.
This program is "putting" the data into the workbook. In this data there is a
countdown clock that counts down to "take off" for a race.
I have a IF formula in Excel to get out the value"logg", in cell E28, if the
value in the countdown clock is below 00:00:30
and value "not" if it´s anything else. This values is linked to another
workbook, in cell M1.

When this value is changing from "not" to "logg" i want to run "Macro1" that
copy specific data from A1:H10 fromthe first workbook to the other with a
offset so the data is been pasting in after each other.
I have tried with sub change and selection change codes that i found in here
but the only thing that happens is that the dialog window for the macro is
popping up.
I also tried with the calculate sub and it works but it´s keep running every
second and pasting in the data over and over again until the value in cell M1
is changing to "not" .

I hope anyone can help me with this.