[TABLE="width: 310"]
<tbody>[TR]
[TD]I wonder if any members of this forum could kindly help me with this problem?[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]In my spreadsheet, cell DD4 has a countdown timer running, linked to a website, and the timer runs down to zero 00:00:00, and then continues past zero with a negative sign, e.g. -00:01:00 after one minute, and so on.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]What I am trying to achieve is to compare this timer's value with a fixed static value in cell DD3, that value will be 00:01:00. When both values are momentarily equal I want to call two macros, Macro1, Macro2.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Can this be done with this kind of statement in VBA, or is there another way, perhaps with using TimeValue formula?[/TD]
[/TR]
[TR]
[TD]I have tried fiddling with this code on Workbook Open[/TD]
[/TR]
[TR]
[TD]Private Sub Workbook_Open()
Application.OnTime TimeValue(Range("DD4").Text = Range("DD3").Text), "Macro1"
Application.OnTime TimeValue(Range("DD4").Text = Range("DD3").Text), "Macro2"
End Sub
<strike></strike>[/TD]
[/TR]
[TR]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]But how to compare the value in the timer to the fixed value in DD3? Both macros need to run automatically when the two time values are equal.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]I am always very appreciative of the help from the knowledgeable members of this forum.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Regards,[/TD]
[/TR]
[TR]
[TD]Vern[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD]I wonder if any members of this forum could kindly help me with this problem?[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]In my spreadsheet, cell DD4 has a countdown timer running, linked to a website, and the timer runs down to zero 00:00:00, and then continues past zero with a negative sign, e.g. -00:01:00 after one minute, and so on.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]What I am trying to achieve is to compare this timer's value with a fixed static value in cell DD3, that value will be 00:01:00. When both values are momentarily equal I want to call two macros, Macro1, Macro2.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Can this be done with this kind of statement in VBA, or is there another way, perhaps with using TimeValue formula?[/TD]
[/TR]
[TR]
[TD]I have tried fiddling with this code on Workbook Open[/TD]
[/TR]
[TR]
[TD]Private Sub Workbook_Open()
Application.OnTime TimeValue(Range("DD4").Text = Range("DD3").Text), "Macro1"
Application.OnTime TimeValue(Range("DD4").Text = Range("DD3").Text), "Macro2"
End Sub
<strike></strike>[/TD]
[/TR]
[TR]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]But how to compare the value in the timer to the fixed value in DD3? Both macros need to run automatically when the two time values are equal.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]I am always very appreciative of the help from the knowledgeable members of this forum.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Regards,[/TD]
[/TR]
[TR]
[TD]Vern[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]