String split by textbox wrap

Cheek
09-05-2003, 11:56 AM
I'm new here, so hello.. :)

As you guessed I have a problem. I want to split the text from a textbox by the wrapping on screen. So not by the actual lines which can be splitted by returns. But I don't know how. vbNewLine just splits by returns...

I mean this:

If you load a text:

This is the sentence to be loaded.

And put it in a small text box it will be like this:

This is the
sentence
to be
loaded.

Now I want to get:
a(1) = "This is the"
a(2) = "sentence"
a(3) = "to be"
a(4) = "loaded."

But if I split it by vbNewLine or any other I treid it will just give.

a(1) = "This is the sentence to be loaded."

Thinker
09-05-2003, 12:00 PM
I just posted a solution to a similar question earlier today...
http://www.visualbasicforum.com/showthread.php?threadid=104822

Cheek
09-05-2003, 02:38 PM
Ow, ok, well, I saw that code before, when I was searching the forum, but I didn't really understand it. But now I do and it works perfect, thanks a lot! :D

Thinker
09-05-2003, 03:00 PM
Good, glad you learned how it works. I didn't explain the split part since
you said you were already trying to work with split.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum