VB Code:
  1. Private Sub mnuFileSave_Click()
  2. 'Save both text boxes into 1 text document
  3. Dim sTextMixed As String
  4. On Error GoTo No_Save
  5. dlgSave.ShowSave
  6. sTextMixed = txtNotes.Text & vbCrLf & vbCrLf & txtCode.Text
  7.    
  8. If dlgSave.FileName = "" Then
  9. Me.Refresh
  10. Exit Sub
  11. Else
  12. Open dlgSave.FileName For Output As #1
  13. Print #1, sTextMixed
  14. Close #1
  15. Exit Sub
  16. End If
  17. No_Save:
  18. MsgBox ("There was a problem saving the file"), vbCritical, "Could not save"
  19. End Sub