This one loops through a text-file and picks info line by line out of it,
but when it has read all of the lines the following error occurs on: Select
Case arr_lijn(0)
"subscript out of range"
So, I ask of you: What's wrong?
For Each file In files
Open padnaam & objAttachment For Input Access Read Lock Read As
#1
Do While Not EOF(1) ' Loop until end of file.
str_lijn = ""
'Lees de variabelen uit het bestand
Line Input #1, str_lijn
arr_lijn = Split(str_lijn, "=")
Select Case arr_lijn(0)
Case "e-mailadres="
str_emailadres = arr_lijn(1)
Case "omschrijving="
str_omschrijving = arr_lijn(1)
Case "TijdstipIn="
str_tijd = arr_lijn(1)
Case "Intaker_klant="
str_intaker_klant = arr_lijn(1)
Case "statusid="
str_statusid = arr_lijn(1)
Case "datumin="
str_datumin = arr_lijn(1)
End Select
Loop
Close #1 'Bestand afsluiten
MsgBox "Uw database is geupdated", vbInformation
file.Delete
Next