..location to save it. Also want to do the same things with a Rich Text text box. and Finally be able to load into the respective text boxes a saved file.
Here's what I have so far:
Code:
Private Sub cmdSavePlain_Click()
Dim dlgOpen As FileDialog
Dim myTxt As String
myTxt = txtSource 'whatever text box your text is in
Open "K:\R&D Dept\Development Lab\R&D Test Request System (For testing and training)\Temporary Attachments\Plain Text x.txt" For Append As #1 ' change the path to reflect your path
Print #1, myTxt
Close #1
Set dlgOpen = Application.FileDialog(msoFileDialogSaveAs)
With dlgOpen
.InitialFileName = "K:\R&D Dept\Development Lab\R&D Test Request System (For testing and training)\Temporary Attachments\Plain Text x.txt"
.Show
End With
End Sub
Private Sub cmdSaveRich_Click()
Dim dlgOpen As FileDialog
Dim myTxt As String
myTxt = txtHTML 'whatever text box your text is in
Open "K:\R&D Dept\Development Lab\R&D Test Request System (For testing and training)\Temporary Attachments\Rich Text x.txt" For Append As #1 ' change the path to reflect your path
Print #1, myTxt
Close #1
Set dlgOpen = Application.FileDialog(msoFileDialogSaveAs)
With dlgOpen
.InitialFileName = "K:\R&D Dept\Development Lab\R&D Test Request System (For testing and training)\Temporary Attachments\Plain Text x.txt"
.Show
End With
End Sub