Results 1 to 2 of 2

Thread: save and print functions (help me !!!!)

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Galt, Ca
    Posts
    47

    Post

    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

  2. #2
    Lively Member
    Join Date
    Feb 2000
    Posts
    118

    Post Saving

    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

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