For I = 0 To phoneMap.Size - 1
'get the key out
Dim Key As String= phoneMap.GetKeyAt(I)
Dim Value As String= phoneMap.GetValueAt(I)
Log("read for date " & Value)
Dim comma As Int = Value.IndexOf(",")
Dim dateSaved As String = Value.SubString(comma +1)
'PROBLEM! You have a loop through a list but the list is shrinking as items are deleted from it, therefore you run out of items and the system crashes, ie: it wants to loop to 14 but you only have 7 in the list because you have just deleted out 7. fixed with below sort of
Try 'nasty coding but wtf
If (dateSaved <= date14DaysAgo) Then
Log(" delete this entry too old " & dateSaved)
phoneMap.Remove(Key)
End If
Catch
End Try
Next