Exceladd1ct
Board Regular
- Joined
- Feb 10, 2019
- Messages
- 76
Hello, i am not so good with VBA.
Can anyone please help me understand how can i get the system current time and keep it as a constant value?
When i do the math, i want the "1:12" value to be added to the initial system time value(when the script was run the first time), even if i run the script after few hours.
I hove i made myself clear.
Thank you!
Can anyone please help me understand how can i get the system current time and keep it as a constant value?
Code:
Sub Button1_Click()
Dim MyTime
MyTime = TimeValue(Time)
MsgBox (MyTime)
ModTime = MyTime + TimeValue("1:12")
MsgBox (ModTime)
End Sub
When i do the math, i want the "1:12" value to be added to the initial system time value(when the script was run the first time), even if i run the script after few hours.
I hove i made myself clear.
Thank you!
Last edited: