954,072 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

File is in process :[

Dim sw As StreamWriter
        Try
            sw = File.AppendText(CurDir() & "\deskimages.txt")
            sw.Write(TextBox1.Text & " " & TextBox2.Text)
            sw.Flush()
        Catch exc As Exception
            MsgBox(exc.Message)
        Finally
            If Not sw Is Nothing Then
                sw.Close()
            End If
        End Try
        Dim tw As IO.TextWriter
        tw = System.IO.File.CreateText(CurDir() & "\profiles2\" & TextBox1.Text & " " & TextBox2.Text & ".txt")
        tw.WriteLine(TextBox1.Text)
        tw.WriteLine(TextBox2.Text)
        tw.WriteLine(TextBox3.Text)
        tw.WriteLine(ComboBox1.SelectedItem)
        tw.WriteLine(ComboBox2.SelectedItem)
        tw.WriteLine(TextBox4.Text)
        tw.Dispose()
        tw.Close()
        Me.Close()


I don't get what isn't working...it's supposed to add a line to the deskimages.txt and then after wards, create another text file somewhere else and write data to it. But it says the deskimages.text is in use. Any help?

duder
Newbie Poster
2 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Wow I'm an idiot. It was reading it but not closing on another form. Thanks anyways!

duder
Newbie Poster
2 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

If you have got the sollution then plz mark the thread as solved.

Pgmer
Master Poster
714 posts since Apr 2008
Reputation Points: 54
Solved Threads: 121
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You