Working on a project for work. Creating a timer, 1 hr and 2 hr. Want the user to select and run either the 1hr or 2hr. There is a formula in the cell which is why there is a type mismatch.
VBA project below:
Sub srarttimer()
Application.ontime now + timevalue("00:00:01"), "nexttick"
End sub
Sub nexttick()
If sheet1.range("e4")=0 then exit sub
Sheet1.range("e4").value=sheet1.range.value- timevalue("00:00:01")
If sheet1.range("e4").value<=timevalue("00:10:00") then sheet1.shapes("texbox1").fill.forecolor.rgb=rgb(255'0'0)
Else
Sheet1.shapes("textbox1").fill.forecolor.rgb=(255, 255, 255)
End if
Starttimer
End sub
Sub stoptimer()
On In error resume next
Application.ontime.now+timevalue("00:00:01"),"nexttick, , false
End sub
The "e4" cell value is "=d4" . If I put an actual number in, 2:00:00
It works fine. I want user to select time for e4 STAT=1hr, ASAP=2hr
Novice guy here...please be kind. Lol
Thanks in advance for looking at this problem.
VBA project below:
Sub srarttimer()
Application.ontime now + timevalue("00:00:01"), "nexttick"
End sub
Sub nexttick()
If sheet1.range("e4")=0 then exit sub
Sheet1.range("e4").value=sheet1.range.value- timevalue("00:00:01")
If sheet1.range("e4").value<=timevalue("00:10:00") then sheet1.shapes("texbox1").fill.forecolor.rgb=rgb(255'0'0)
Else
Sheet1.shapes("textbox1").fill.forecolor.rgb=(255, 255, 255)
End if
Starttimer
End sub
Sub stoptimer()
On In error resume next
Application.ontime.now+timevalue("00:00:01"),"nexttick, , false
End sub
The "e4" cell value is "=d4" . If I put an actual number in, 2:00:00
It works fine. I want user to select time for e4 STAT=1hr, ASAP=2hr
Novice guy here...please be kind. Lol
Thanks in advance for looking at this problem.