I have to write logging information into a file:

VB Code:
  1. Open "C:\pgm.log" For Output As #1
  2. ...
  3. print#1, "debug data"
  4. ...
  5. close #1

Is there a way to force VB to flush the buffer to the disk once in a while? I could not find any flush function for files. Right now I have to close and re-open the file with append after every write, which is much too slow.