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 |
Related posts:
- How to Print a Text file
- How to print a text file with its default printer
- How to Remove all empty lines from the text file
- How to load a text file into list box for a given file name
- How to delete a line for a given line number from a text file
- How to write text in a given text file (in three ways)
- How to add contents of text file to a list box
- How to search for a string in a text file if found, display that line to the user.
- How to I create a text file from part of another text file (for given line numbers like Line No. 2 to 7)
- How to Search & delete a string in text File