First add a reference to Microsoft Scripting Runtime Library.
To open file and show it in a textbox (don't forget to set the MultiLine property to True)
Code:
Dim oFSO As New FileSystemObject
Dim oFile As Object
Set oFile = oFSO.OpenTextFile("F:\Test.txt", ForReading, False, TristateUseDefault)
Text1.Text = oFile.ReadAll
To save the contents of the textbox to a file:
Code:
Dim oFSO As New FileSystemObject
Dim oFile As Object
Set oFile = oFSO.OpenTextFile("F:\Test2.txt", ForWriting, TristateUseDefault)
oFile.Write Text1.Text
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819