Attribute VB_Name = "modReminders"
Private D() As REMTIME
Private Type REMTIME
    rtDate As String
    rtTime As String
    rtMessage As String
    rtShown As Boolean
End Type

Public Sub LoadReminders()
On Error GoTo hErr
1   ReDim D(0)
2   Dim FS As New FileSystemObject, TS As TextStream
    Set TS = FS.OpenTextFile(AppData & "Data\Other\Reminders.ini", ForReading, True)
    Do Until TS.AtEndOfStream
5       Dim LN As String
6       LN = TS.ReadLine
7       If LenB(LN) Then
8           If InStrB(LN, ",") Then
9               Dim S() As String, A As New objAlert
10              S = Split(LN, ",")
11              Debug.Print "Line: " & LN
12              If UBound(S) = 2 Then
                    If LenB(D(0).rtDate) > 0 Then ReDim Preserve D(UBound(D) + 1)
                    With D(UBound(D))
                        .rtDate = Trim$(S(0))
                        .rtTime = Trim$(S(1))
                        .rtMessage = Trim$(S(2))
                    End With
                End If
            End If
        End If
    Loop
    Exit Sub
hErr:
    ErrorHandler Err.Number, Err.Description, Erl, "Reminders", "LoadReminders"
End Sub

Public Sub RunReminders()
On Error GoTo hErr:
    Dim I As Integer
1   For I = 0 To UBound(D)
3           If Not D(I).rtShown Then
4               Dim Z() As String
5               Z = Split(D(I).rtDate, "/")
6               If UBound(Z) = 2 Then
7                   If Day(Date) = Val(Z(1)) And Month(Date) = Val(Z(0)) And Year(Date) = Val(Z(2)) Then
8                       If Format$(Time, "hh:mm") = D(I).rtTime Then
9                           ShowAlert "Reminder:", D(I).rtMessage & vbCrLf, True, True
10                          Output frmBot.rtbChat(SelBot), &HB0, , "[Reminder]: " & D(I).rtMessage
11                          D(I).rtShown = True
                        End If
                    End If
                End If
            End If
    Next I
    Exit Sub
hErr:
    ErrorHandler Err.Number, Err.Description, Erl, "Reminders", "Run"
End Sub
