silverballs
MIS
Hi
I am a real novice to VB6. I am trying to create a small application that will when run open a text file and display the contents in a text box. Here's what i have so far and obviously the line Text1.Text = FileSpec dispays the filename rather than the file contents.
Can anyone please tell me where i am goign wrong and what I need to do please
Cheers
Private Sub Form_Load()
Dim fso, File
Dim FileSpec As String
FileSpec = "C:\test.txt"
Set fso = CreateObject("Scripting.FileSystemObject"
Text1.Text = FileSpec
End Sub
I am a real novice to VB6. I am trying to create a small application that will when run open a text file and display the contents in a text box. Here's what i have so far and obviously the line Text1.Text = FileSpec dispays the filename rather than the file contents.
Can anyone please tell me where i am goign wrong and what I need to do please
Cheers
Private Sub Form_Load()
Dim fso, File
Dim FileSpec As String
FileSpec = "C:\test.txt"
Set fso = CreateObject("Scripting.FileSystemObject"
Text1.Text = FileSpec
End Sub