save RichTextBox

vb6 Bahrain
  • 14 years ago

    Hi everyone...
    I used the below code for save, it work but if I reload the file and make chang in RichTextBox1 and save it with the same name,I have problem it is the fist file (NotePade) save in it what have in RichTextBox2 and the second file is empty. 

    With CommonDialog1
            .CancelError = True
            .Filter = "Text files (*.txt)|*.txt"
            .DialogTitle = "Save the file..."
                If .filename <> "" Then
                   RichTextBox1.SaveFile .filename, rtfText
                   RichTextBox2.SaveFile Left(.filename, Len(.filename) - 4) & "first.txt", rtfText
                End If
        End With

    So how can I correct this problem?

  • 14 years ago


    I know the problem.



Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The generation of random numbers is too important to be left to chance.” - Robert R. Coveyou