CodeItBetter Programming Another VB Programming Blog

How to Load a File To Text Box

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
'Controls - How to Load a File To Text Box

Option Explicit
 
'Add a Text Box to your form. Set the Text Box MultiLine property to True and Insert the following code:

Private Sub Form_Load()
    Dim sFile As String
    sFile = "c:\autoexec.bat"
    Open sFile For Input As #1
    Text1.Text = Input(LOF(1), #1)
    Close #1
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.