Results 1 to 14 of 14

Thread: Saving A Text / HTML file {Resolved}

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    346

    Resolved Saving A Text / HTML file {Resolved}

    Hey I want to save a file to either text or html frm a richtext box, here is my code i have written that wont work

    VB Code:
    1. Private Sub mnuFileSave_Click()
    2. Dim sfilename As Long
    3. On Error GoTo Err
    4. CommonDialog1.Filter = "Text Document|*.txt |HTML Document | *.htm;*.html"
    5. CommonDialog1.ShowSave
    6. sfilename = CommonDialog1.FileName
    7. Open sfilename For Output As #1
    8. Write #1, RichTextMain1.Text
    9. Close #1
    10. Err:
    11. End Sub
    Last edited by robcarr2; May 26th, 2005 at 04:34 PM.

    Microsoft gives you Windows, Linux gives you the whole house!


    I am who I am because of who we all are.


    We have just gotten a wake up call from the Nintendo generation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width