Jun 23, 2003 #1 J jstewart Member Joined Jun 18, 2003 Messages 6 how do you create a log file? sorry for all the questions, im relearning vb with vb.net, i know vb6, and its proving tough for me, so thanks!
how do you create a log file? sorry for all the questions, im relearning vb with vb.net, i know vb6, and its proving tough for me, so thanks!
Jun 23, 2003 #2 V Volte Neutiquam Erro Joined Nov 17, 2002 Messages 2,165 User Rank *Expert* You need to create a StreamWriter object (you can use the File.CreateText() method to create/open a textfile writer) and then write to that. For example, Code: Dim sw As IO.StreamWriter = IO.File.CreateText("C:\logfile.text") sw.WriteLine("Action logged at " & Now & " : Moo") sw.Close()
You need to create a StreamWriter object (you can use the File.CreateText() method to create/open a textfile writer) and then write to that. For example, Code: Dim sw As IO.StreamWriter = IO.File.CreateText("C:\logfile.text") sw.WriteLine("Action logged at " & Now & " : Moo") sw.Close()