Click to See Complete Forum and Search --> : SHowing a Text File in a Text Box


tschilbach
July 11th, 2001, 06:04 PM
OK what am I doing wrong? I just want to pull a textfile into memory and then display it in the textbox for editing of my form. Thank you in advance:

Option Explicit

Private Sub Command1_Click()

Dim strTextFile As String
Dim strTextKine As String
Dim strFilePath As String

Open "c:\temp.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, strTextFile
strTextFile = strTextFile & strTextLine & vbCrLf
Loop
Close #1

Text1.Text = strTextFile

End Sub


Timothy H. Schilbach
Alpha Omega Design Inc.
tschilbach@aodinc.com

John G Duffy
July 11th, 2001, 06:29 PM
Line input #1, strTextFile
' should read
Line input #1, strTextLine



' also Check your Dims. one is TextKine I think you meant TextLine.


John G