ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Store text file in workbook? (https://www.excelbanter.com/excel-programming/311649-store-text-file-workbook.html)

Don Wiss

Store text file in workbook?
 
In an add-in I'm developing I'd like to pop up a user form that displays a
text file. The text file I want to display is a preformatted table about 20
rows by 40 columns. I have the user form set to a monospaced font.

I thought about putting all the text into a single cell. But I couldn't
easily put the carriage returns where I want them. It likes to do its own
wrapping to fit the cell.

I see I can insert a WordPad object onto a worksheet, but better would be a
NotePad object.

What's the best way to handle this?

My next question will be how to print this text file, but how I end up
storing it has to come first.

Don <donwiss at panix.com.

NickHK

Store text file in workbook?
 
Don,
What about a RichTextText box on the user form ?

NickHK

"Don Wiss" wrote in message
...
In an add-in I'm developing I'd like to pop up a user form that displays a
text file. The text file I want to display is a preformatted table about

20
rows by 40 columns. I have the user form set to a monospaced font.

I thought about putting all the text into a single cell. But I couldn't
easily put the carriage returns where I want them. It likes to do its own
wrapping to fit the cell.

I see I can insert a WordPad object onto a worksheet, but better would be

a
NotePad object.

What's the best way to handle this?

My next question will be how to print this text file, but how I end up
storing it has to come first.

Don <donwiss at panix.com.




Don Wiss

Store text file in workbook?
 
On Tue, 28 Sep 2004 13:48:59 +0800, NickHK wrote:

Don Wiss wrote:
In an add-in I'm developing I'd like to pop up a user form that displays a
text file. The text file I want to display is a preformatted table about 20
rows by 40 columns. I have the user form set to a monospaced font.

I thought about putting all the text into a single cell. But I couldn't
easily put the carriage returns where I want them. It likes to do its own
wrapping to fit the cell.

I see I can insert a WordPad object onto a worksheet, but better would be a
NotePad object.

What's the best way to handle this?


What about a RichTextText box on the user form ?


Why? A textbox works just fine. As long as I have my source data in a
single file. Are you saying a richtextbox can take data coming from
multiple spreadsheet cells?

Don <donwiss at panix.com.

Don Wiss

Store text file in workbook?
 
On Tue, 28 Sep 2004 13:48:59 +0800, NickHK wrote:

What about a RichTextText box on the user form ?


What is a RichTextText box? I didn't see it in the User Form Toolbox.

Don <donwiss at panix.com.

Norman Jones

Store text file in workbook?
 
Hi Don,

What is a RichTextText box?


See MSDN:

http://tinyurl.com/59rkf

I didn't see it in the User Form Toolbox.


Tools | Additional Controls | Check Microsoft Rich TextBox Control | OK


---
Regards,
Norman



"Don Wiss" wrote in message
...
On Tue, 28 Sep 2004 13:48:59 +0800, NickHK wrote:

What about a RichTextText box on the user form ?


What is a RichTextText box? I didn't see it in the User Form Toolbox.

Don <donwiss at panix.com.




Don Wiss

Store text file in workbook?
 
On Wed, 29 Sep 2004, Norman Jones wrote:

What is a RichTextText box?


See MSDN:

http://tinyurl.com/59rkf


Okay. Thanks. But I don't see how this helps me. I don't want to load the
text from a file. I want the add-in to be self contained. I don't need any
of these extra features. I don't even need scroll bars, as all of the text
will fit inside a large textbox.

I suppose I can put the text with each line in a worksheet cell, then write
a macro that reads the cells putting carriage return-line feed pairs
between each line.

Don <donwiss at panix.com.

Norman Jones

Store text file in workbook?
 
Hi Don,

My post was intended to address your two specific questions concerning the
nature and availability of a RichTextBox rather than to respond to
substantive issues raised in the earlier strands of your thread, which I had
not followed.

---
Regards,
Norman



"Don Wiss" wrote in message
...
On Wed, 29 Sep 2004, Norman Jones wrote:

What is a RichTextText box?


See MSDN:

http://tinyurl.com/59rkf


Okay. Thanks. But I don't see how this helps me. I don't want to load the
text from a file. I want the add-in to be self contained. I don't need any
of these extra features. I don't even need scroll bars, as all of the text
will fit inside a large textbox.

I suppose I can put the text with each line in a worksheet cell, then
write
a macro that reads the cells putting carriage return-line feed pairs
between each line.

Don <donwiss at panix.com.





All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com