well, i've found some things and arraged thing so as to fit what I need, but still it does not work.
any sugestions?
Private Sub Workbook_Open()
Dim CurMin As Integer, CurHr As Integer
Dim StartTime As Date
CurMin = CInt(Right(Format(Time, "HH:MM"), 2))
CurHr = CInt(Left(Format(Time, "HH:MM"), 2))
If CurMin = 20 Then
Call Gera
ElseIf CurMin > 21 Then
If CurHr < 15 Then
StartTime = TimeValue(CurHr + 1 & ":20:00")
Application.OnTime StartTime, "Gera"
Else
StartTime = TimeValue("10:20:00")
Application.OnTime StartTime, "Gera"
End If
Else
StartTime = TimeValue(CurHr & ":20:00")
Application.OnTime StartTime, "Gera"
End If
End Select
End Sub