|
-
Jan 11th, 2000, 06:57 AM
#1
Thread Starter
New Member
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
-
Jan 11th, 2000, 10:41 AM
#2
Lively Member
an easy way is to use a RichTextBox
RichTextBox1.LoadFile pth
pth is a variable for Path and FileName
-
Jan 12th, 2000, 06:05 PM
#3
Junior Member
You can use the following code:
FileName$ = "c:\test.txt"
Open FileName$ For Input As #1
Text1.Text = Input(LOF(1), 1)
Close
-
Jan 12th, 2000, 09:47 PM
#4
Hyperactive Member
Quick question, what is the LOF?
-
Jan 12th, 2000, 10:10 PM
#5
LOF = Length Of File
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
-
Jan 12th, 2000, 10:18 PM
#6
Hyperactive Member
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 :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|