i need to know how to do save and print functions with a REGULAR(not rich) textbox. i have some code for both.. but it doesn't work.. can you help me?? i can show you the code if you want to see it.
thanx
empty words
Printable View
i need to know how to do save and print functions with a REGULAR(not rich) textbox. i have some code for both.. but it doesn't work.. can you help me?? i can show you the code if you want to see it.
thanx
empty words
I got this code from someone here and it worked for me. Try it. text box named Text1.
Private Sub cmdSave_Click()
'Declare variable
Dim strFilename As String
'Do the error handler
cdbOpenSave.CancelError = True
On Error GoTo errhandler
'Set the properties of the text control
cdbOpenSave.Filter = _
"Text Files|*.txt*"
'Show the save-as dialog box
cdbOpenSave.ShowSave
'retrieve the filename
strFilename = cdbOpenSave.FileName & ".txt"
'save the file
Open strFilename For Output As #1
Print #1, Text1
Close #1
Exit Sub
errhandler:
End Sub