
Newbie Here...Need Simple Code to Open txt file
Robert,
If you have reached the point where you have successfully retrieved a
filename from the common dialog then you are most of the way home.
I assume you have a form with a textbox set to multiline mode on it
ready to receive the text from the file. I am going to assume that
the filename you got from the coomon dialog is contained in
CommonDialog1.Filename as this is normally where it would be
To get the text to the text box ....
Open CommonDialog1.Filename for Input as #1
Input #1, TextBox , LOF(1)
This will grab the whole file and put it in the text box
Quote:
>I have only been working with VB for a week now and have worked thru all
>the samples
>ans stuff, so what i want to do now is a simple program similar to
>notepad. All I want to do is use a CommonDialog control to open a txt
>file. I have the CommDialog control figured out, but from there I'm stuck.
>My question:
>What minimal controls do i need on page to put the txt file into
>What code and where does the code go?
>I know this is a simpl question, but we all start somewhere.........
>Bob
A mind which has been expanded by a new idea,
never returns to it's original dimensions.