-
I am new to VB and having a hard time displaying a file in a text box. I have figured out the code to get the file to open but haven't been able to write the code so that a report will display in the text box instead of just the file name. Can anyone help?
------------------
M Gifford
-
an easy way is to use a RichTextBox
RichTextBox1.LoadFile pth
pth is a variable for Path and FileName
-
You can use the following code:
FileName$ = "c:\test.txt"
Open FileName$ For Input As #1
Text1.Text = Input(LOF(1), 1)
Close
-
Quick question, what is the LOF?
-
LOF = Length Of File
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
-
Ah, thanks. I guess if I would have thought a little harder I might have figured that one out. Ah well, what can I say, it's early Thursday morning and I'm still asleep. Honest, that's the reason :-)