Writing text.

stefonalfaro

Member
Joined
Dec 3, 2007
Messages
16
Programming Experience
Beginner
VB.NET:
System.IO.File.Exists(location)
            Dim objWriter As New System.IO.StreamWriter(location)
            objWriter.Write(text)
            objWriter.Close()
            MsgBox("Text written to file")

When ever I try to create that text file I always get an acess denied error. Is there any way to fix that.

Or could some change my code. All I want to do is create a text file on my C drive.
 
Back
Top