-
I apologise now, this is a simple question!!! a momment of density has got me baffled, i have a text file which nees to appear in a text box! i have the file name retrived using the commomdialog ut how do i get it to display the contents of the text file in the text box??
I'm sure its easy, infact i know its easy i just can't think!!
cheers in advance
Andy
-
You have to open the file for Input and read it.
Code:
Dim iFile As Integer
'the code to show the common dialog
'goes here
iFile = FreeFile
Open CommonDialog1.FileName For Input As #iFile
Text1.Text = Input(LOF(iFile), iFile)
Close #iFile
Good luck!