Results 1 to 3 of 3

Thread: Loading Data

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    3

    Exclamation Loading Data

    I would like to know how to load several lines of data from a file, to a form.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    saving and loading text from/into textbox's sample

    VB Code:
    1. Private Sub Command1_Click()
    2.     'Save the text
    3.     Open "C:\TEST.TXT" For Output As #1
    4.         Write #1, Text1.Text
    5.     Close #1
    6. End Sub
    7.  
    8. Private Sub Command2_Click()
    9.     'Load the text
    10.     Open "C:\TEST.TXT" For Input As #1
    11.         Text1.Text = Input(LOF(1), 1)
    12.     Close #1
    13. End Sub


    if that is not what u want, u have to elaborate a bit
    -= a peet post =-

  3. #3
    Hyperactive Member -=XQ=-'s Avatar
    Join Date
    Mar 2002
    Location
    Liverpool, England, UK
    Posts
    278
    Beaten to it by 7mins..... dam proxy caching pages, don't i look the gormless d!@$

    From a text file it's...........

    Code:
        
        Dim strX As String
        Dim intX As Integer
        
        intX = FreeFile
        
        Open "PATH" For Input As #intX
        
        Do Until EOF(intX)
            Input #intX, strX
            Print strX
        Loop
        
        Close #intX
    This reads the text file one line at a time and prints it to the form.
    Last edited by -=XQ=-; May 19th, 2002 at 06:13 PM.
    See ya later,

    -=XQ=-

    "Reality is merely an illusion, albeit a very persistent one. "
    - Albert Einstein (1879-1955)
    This is the coolest site ever!!!

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