Here's a way to read a text file (.txt) to a textbox in a form
VB6:
VB 2005+:Dim fso, f
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.opentextfile(App.Path & "\YourTextFile.txt", ForReading)
Text1.Text = f.read(100000)
I hope you find it usefulDim sFname As String
sFname = My.Application.Info.DirectoryPath & "\YourTextFile.txt"
If Not FileExist(My.Application.Info.DirectoryPath & "\YourTextFile.txt") Then
Else
TextBox1.Text = IO.File.ReadAllText(My.Application.Info.DirectoryPath & "\YourTextFile.txt")
End If
//Ebonesser![]()