line break in vbs

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

This script is supposed to log the data and add a line break after each run.
flog.Write (Now & " Response Time: " & DateDiff("s", StartTime, EndTime) &
Chr(13))
but it doesn't work
5/19/2004 4:19:30 PM Response status: 12007 Response Time: 185/19/2004
4:20:27 PM Response status: 12007 Response Time: 7

it should be
5/19/2004 4:19:30 PM Response status: 12007 Response Time: 18
5/19/2004 4:20:27 PM Response status: 12007 Response Time: 7

i also tried Chr(10) it didn't work either.

Aaron
 
Either use WriteLIne, or if you must use Write then add "& vbCRLF" to the
end of the string.

13 is a carriage return and 10 is a Linefeed . You want both which is what
a vbCRLF is.

Either
flog.WriteLine (Now & " Response Time: " & DateDiff("s", StartTime, EndTime)
or
flog.Write (Now & " Response Time: " & DateDiff("s", StartTime, EndTime) &
vbCRLF)
 
Back
Top