Results 1 to 3 of 3

Thread: Open and Save

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    106

    Question

    Ok, I know this is pretty basic and I should know this, but . . . I can't find code to save multiple textboxes and their layouts. What I mean is, I have alot of textboxes in a project I am working on for school. I want to add a open/save dialog so anything they create can be re-opened if they make a mistake on the original. Anyone that is interested in helping me can download the original project at http://www.geocities.com/jon_davis24/project.zip .


    Thank you,
    Jon Davis24

  2. #2
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258
    Seeing thta it's for school I won't Give you the whole answer , because when you do it at WORK it means your going to be asking others to do your work for YOU .

    Code:
    'Loads the file into the textbox
    'LOAD "stuff.txt",text1
    '*******************************
    '   - Fixed on october 8 2000 by "[]Private[]
    ' Now it works .
    '
    '******************************
    Public Function TextBoxLoad(TextFile As String, Text As TextBox)
    Dim strwordlist As String
     
       
      
            'load from file
            Open App.path & "\" & TextFile For Input As #1
                 While Not EOF(1)
                    Input #1, strwordlist
                    Text.Text = strwordlist
                 Wend
            Close #1
    And
    Code:
    Public Function TextBoxSave(FilePath As String, Text As TextBox)
    On Error GoTo done:
    Dim fno%
    fno = FreeFile
    Open FilePath For Output As #fno
    Print #fno, Text.Text
    Close #fno
    done:
    End Function
    Cheaters never Win ,

    []P
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    106

    Open and Save

    Actually, I have all of the program finished to how I need it. The save thing is extra and I don't get marked on it. If you would rather, I will show him all of the source code WITH the program so he knows I got the open/save code from you.

    Thanks,
    JON DAVIS

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