You can let VB handle the file opening/closing bit of the log file by using the app.LogEvent command.
At the start of you program you need to call
App.StartLogging "c:\mylog.log", vbLogToFile
then when you want to log something call
App.LogEvent "String to log.", EventType
here event type can be one of the following, vbLogEventTypeError, vbLogEventTypeWarning or vbLogEventTypeInformation.
I like to keep log files in the application path, this is easy to do by using
App.StartLogging App.Path & "\mylog.log", vbLogToFile
happy logging!
Matt