Dim oLog As New CLog With oLog 'open the log file .LoadLogFile "C:\My Dir\my log.log" 'add a line to the log file .AddLine "Some logged message" 'add a line with a timestamp .AddLine "Bla bla bla", True 'load the current log data into a textbox txtLogData.Text = .GetCurrentLogData & vbCrLf & .GetLogData 'flush the log file back to the disk .SaveLog 'truncate the log file to get rid of old data .CompactLog End With Set oLog = Nothing