Dim strReadLine As String, inTaskMasterSection As Boolean
Dim pos1, pos2 As Integer, strDate As Date, strSQL As String
Dim TenCount As Integer, TimeSum As String, Time As String
Dim junk As Integer, isAS3 As Boolean
Dim Time2 As String
inTaskMasterSection = False
TenCount = 0
Time = ""
TimeSum = ""
junk = 0
Time2 = "00:00"
If InStr(1, strFileName, "(AS3)") Then
isAS3 = True
Else
isAS3 = False
End If
Open strFileName For Input As #1
Do While Not EOF(1)
Line Input #1, strReadLine
If InStr(1, strReadLine, "Sent:") Then
pos1 = InStr(1, strReadLine, ",")
pos2 = Len(strReadLine)
strDate = Mid(strReadLine, pos1 + 1, pos2 - pos1)
End If
pos1 = ""
If InStr(1, strReadLine, "S ") Then
pos1 = InStr(1, strReadLine, "?")
pos1 = InStr(pos1 + 1, strReadLine, "?") + 1
Do While Mid(strReadLine, pos1, 1) = " "
pos1 = pos1 + 1
Loop
pos2 = InStr(1, strReadLine, "/")
Time = Mid(strReadLine, pos1, pos2 - pos1)
'MsgBox (Time)
'MsgBox (TimeSum)
'Begin Time Sum
Dim Time1 As String
Dim strParts1() As String
Dim strParts2() As String
Dim intSeconds As Integer
Time1 = Time
strParts1 = Split(Time1, ":")
strParts2 = Split(Time2, ":")
intSeconds = CInt(strParts1(1)) + CInt(strParts2(1))
If intSeconds > 59 Then
Time2 = CInt(strParts1(0)) + CInt(strParts2(0)) _
+ (CInt(strParts1(1)) + CInt(strParts2(1))) \ 60 _
& ":" & Format((CInt(strParts1(1)) + CInt(strParts2(1))) Mod 60, "00")
Else
Time2 = CInt(strParts1(0)) + CInt(strParts2(0)) _
& ":" & Format((CInt(strParts1(1)) + CInt(strParts2(1))), "00")
End If
'MsgBox (Time2)
'End Time Sum
End If
Loop
Close #1
TimeSum = Time2