Click here to Skip to main content
15,125,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in the following code section i'm trying to save code array called rm()
when i try to save. the program halts with a
microsoft send report message

rs = InputBox("please enter a file name", "save data", "st18-0")
        frs = "C:\ST18\ST19\" & rs & ".18"
        rs = ""
        For i = 1 To 12
            rs += rm(i) + "\n"
        My.Computer.FileSystem.WriteAllText(frs, rs, False)

can anyone assist me please
ps running vb 2008 express ed.

If you're using vb 2008 express, then you're using VB.NET. With that in mind, you should be using a FileStream to write and read files, not My.Computer.FileSystem.

see here[^].
Christian Graus 24-May-10 19:41pm would be fine, is this not just a shortcut ? Inputbox shows this is a vb6 user who needs to learn .ney properly, i admit.
What error do you get?

For an example of a FileStream see here.
Do the folders exist like that ? Did you consider telling us the error ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900