CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2001
    Location
    Kenosha, Wi
    Posts
    37

    SHowing a Text File in a Text Box

    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.
    [email protected]

  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: SHowing a Text File in a Text Box


    Line input #1, strTextFile
    ' should read
    Line input #1, strTextLine



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


    John G

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

Featured