Problems with long text

G

Guest

Hi,

I have a little program, where users enter all kind of data. In one field
they can enter a very long text (like more than 1.000 characters). Now there
is a problem when I am trying to create a report from that data. Everything
goes fine when the text is less than approx. 1.200 characters long, but with
text like 2.000 characters long, Excel won't show or print it in whole. In
the report I have both wrapped and merged range A50:H70 where I try to set
the text. I also tried to create a text box and place the text in it, but
that won't work either. The data is stored into a SQL database and I read it
when creating a report.

But the question in a nutshell: how can I show a very long text (>2.000) in
a report?
 
G

Guest

Take the text as entered and insert hard returns every so often (ALT-ENTER).
This will improve the visibility of the text.
 
G

Guest

I found a solution. I just had to divide the whole text into e.g. 100
character long pieces and then add those pieces to a text box one by one.

I'm answering to my own question just in case someone else is having same
kind of problems.

Here is an example. I have already divided the whole text into pieces and
placed them into an array Arr_text() and the number of pieces is in the
variable ArrCnt.

ActiveSheet.Shapes("Text Box 1").Select
With Selection
.Characters.Text = Arr_text(1)
If ArrCnt > 1 Then 'check if there are more than one piece
For X = 2 To ArrCnt
.Characters(Start:=X * 100).Text = Arr_text(X)
Next X
End If
End With
 

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