Hey everyone.
Max OS X Mojave 7.0.4.2
I have this macro from this the link
https://help.libreoffice.org/6.3/en-US/text/sbasic/shared/03130610.html?DbPAR=BASIC
REM Wait until 6:00 PM then call MyMacro.
REM If after 6:00 PM, exit.
Sub ExampleWaitUntil
Dim vTimeschedule As Long
vTimeSchedule = Date() + TimeValue("18:00:00")
If vTimeSchedule < Now() Then Exit Sub
WaitUntil vTimeSchedule
Call MyMacro
End Sub
And I modified it as follows:
Sub ExampleWaitUntil_Test
Dim z As String
z = "Go to bed"
Dim vTimeschedule As Long
vTimeSchedule = Date() + TimeValue("22:00:00")
WaitUntil vTimeSchedule
MsgBox z
End Sub
Basically, I want to show a message box with the phrase “Go to bed” in it at 22:00:00, so 10p.m.
Unfortunately, it doesn’t seem to work, and I’m not sure why.
Nothing happens, and the code keeps running.
I know the link is for LibreOffice 6.3, but I wanted to know if it would work anyway despite not being the same version of LO.