Click here to Skip to main content
16,020,298 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

VB
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"
        Next
        My.Computer.FileSystem.WriteAllText(frs, rs, False)


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

Do the folders exist like that ? Did you consider telling us the error ?
 
Share this answer
 
What error do you get?

For an example of a FileStream see here.
 
Share this answer
 
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[^].
 
Share this answer
 
Comments
Christian Graus 24-May-10 19:41pm    
System.io.file.writealltext would be fine, is this not just a shortcut ? Inputbox shows this is a vb6 user who needs to learn .ney properly, i admit.

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