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:
Private Sub mnuFileSave_Click() Dim sfilename As Long On Error GoTo Err CommonDialog1.Filter = "Text Document|*.txt |HTML Document | *.htm;*.html" CommonDialog1.ShowSave sfilename = CommonDialog1.FileName Open sfilename For Output As #1 Write #1, RichTextMain1.Text Close #1 Err: End Sub







Reply With Quote