Contents of txt file in text box 
Author Message
 Contents of txt file in text box

Hi all,

Is it possible to load the contents of a small text file in a text box (in a
dialog box or user form)? I've got a macro that writes small notes into text
files. The dialog box offers the possibility to open the text files in Word
but it would also be nice if the dialog could show the contents of a text
file without the text file having to be opened in Word.

Thanks for any help.
Regards,
T



Fri, 01 Oct 2004 15:11:54 GMT  
 Contents of txt file in text box

Open MyTextFile for input as #1
MyTextBox.text = input(LOF(1),1)
myTextFile.close



Quote:

> Hi all,

> Is it possible to load the contents of a small text file in a text box (in
a
> dialog box or user form)? I've got a macro that writes small notes into
text
> files. The dialog box offers the possibility to open the text files in
Word
> but it would also be nice if the dialog could show the contents of a text
> file without the text file having to be opened in Word.

> Thanks for any help.
> Regards,
> T



Fri, 01 Oct 2004 15:23:19 GMT  
 Contents of txt file in text box

Hi Modigliani,

Thanks very much for this one. I did get an error message on
myTextFile.close, so I replaced it with Close #1.

Best regards,
T



Quote:

> Open MyTextFile for input as #1
> MyTextBox.text = input(LOF(1),1)
> myTextFile.close



Fri, 01 Oct 2004 15:51:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. how to read a txt file to text box

2. Want to be able to darge a txt file into a text box

3. save file as .txt or as .rtf in rich text box

4. display txt file in text box???

5. how to read a txt file to text box

6. save file as .txt or as .rtf in rich text box

7. Saving the content of several RTF text boxes on single file

8. Saving Rich Text Box Content to .RTF File

9. read a file and put the contents in a text box

10. Saving Rich Text Box Content to .RTF file

11. text in a text box by file open of a txt file is not the same as having typed in the text box?

12. Write contents of listbox to text file/populate listbox from text file

 

 
Powered by phpBB® Forum Software