Ik gebruik het volgende stukje code in Form_Load van het hoofdformulier:
'Verwijderen oude logbestanden.
MyPath = frmInvestor.ext(App.Path) & "LOG\"
MyFile = Dir(MyPath & "*.*")
Dim filename As String
filename = MyPath & MyFile
Do While MyFile <> ""
Aanroep2 = "ControleKoersBestanden"
If Left$(MyFile,

<> BerekendeDatum And Left$(Right$(MyFile, 7), 3) = "LOG" Then
If MyFile <> "master.fqr" Then
Kill filename
End If
Else
Aanroep2 = ""
CloseFile (filename)
End If
Loop
Wanneer dit stukje code wordt uitgevoerd, krijg ik de fout "Unknown". Wat is er fout aan deze code?