Public Class clslog Public errormailtext As String = "" Public Sub Writelog(ByVal Inhalt As String) FileOpen(99, My.Settings.Log, OpenMode.Append) WriteLine(99, Now.ToString("s") + Chr(9) + Inhalt) FileClose(99) If Inhalt.IndexOf("Fehler") > -1 Then errormailtext = errormailtext + " / " + Inhalt End If If Inhalt.IndexOf("Attribute") > -1 Then errormailtext = errormailtext + " / " + Inhalt End If End Sub End Class