i am just testing code to see if it will work on my sytem at school... a lot of things do not work here... i hae been assigned to create a program that stores data in textfiles on buttonclick, and is able to read them at a later date. on my network drive, text files are restricted, and i cannot open them. using vb i can create a text file, but i receive an error when i try to write to the file. i am not sure if this is a problem in my code or the network policy doing its designated job. this is the code i used to test that i will be able to complete the first section of the task
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.IO.File.Create("I:\Test.txt")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim objWriter As New System.IO.StreamWriter("I:\Test.txt")
objWriter.Write("Testing")
End Sub
End Class
when i run the code, it will create the file. i receive this error when i try to write to the file.Mod Edit:

New Topic/Question
Reply




MultiQuote








|