Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Unanswered: open file for input?

    Can someone help me with this:

    Open COM$ + "\fxd.txt" For Input As #TempFileNumber%

    'loop through the Array to input each record

    For i% = 1 To NUMROWS&
    For j% = 1 To colcount
    What is this line doing? -->Input #TempFileNumber%, myArray$(j, i)
    Next j%
    Next i%

    is this how you clear an array in vb? --> Erase myArray$

  2. #2
    Join Date
    Nov 2006
    North of San Francisco
    Dim array1(10, 10) As String
    Private Sub Form_Load()

    Open "C:\text.txt" For Input As #1
    For row = 0 To 10
    For col = 0 To 10
    Line Input #1, array1(row, col)
    Next col
    Next row

    End Sub
    The input line is reading one line from the text file or up to the CrLf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts