Store text file in workbook?

D

Don Wiss

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>.
 
D

Don Wiss

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>.
 
D

Don Wiss


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>.
 
N

Norman Jones

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top