|
-
Sep 5th, 2001, 02:40 AM
#6
Hyperactive Member
I do not know if you want to use the get statement for a specific reason, but with this example you read the file line by line and stock it in a dynamic array.
Remeber to always use the option explicit statement to avoid errors.
VB Code
Option Explicit
Dim intFNum As Integer
Dim intcounter As Integer
Dim varline As String
Dim strArray() As String
Private Sub test()
intFNum = FreeFile
intcounter = 0
Open ("C:" & "\" & "RegSales.txt") For Input As #intFNum
'im not sure what to put for len
Do Until EOF(intFNum)
intcounter = intcounter + 1
Input #intFNum, varline
ReDim Preserve strArray(intcounter)
strArray(intcounter) = varline
Loop
Close #intFNum
End Sub
Greetz, Luc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|