469,150 Members | 1,988 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,150 developers. It's quick & easy.

file writing

I need the file name to be the date and the studnets name and have new file every time I open it

'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("H:\vb\test.txt")
'Write a line of text.
objStreamWriter.WriteLine(APhilAvestrue)
objStreamWriter.WriteLine(MyTime) 'Write a second line of text.
'Close the file.
objStreamWriter.Close()
fileReader = My.Computer.FileSystem.ReadAllText("H:\vb\test.txt ")
Dec 11 '07 #1
1 910
i guess what my real qustion is. can i make the the file name a variable
Dec 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

48 posts views Thread by Joseph | last post: by
2 posts views Thread by Pierre Rouleau | last post: by
8 posts views Thread by Brandon McCombs | last post: by
4 posts views Thread by Oliver Knoll | last post: by
3 posts views Thread by StGo | last post: by
4 posts views Thread by Doug | last post: by
3 posts views Thread by brook | last post: by
12 posts views Thread by glennanthonyb | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.