split function

Posted on 2004-11-11
Medium Priority
Last Modified: 2010-04-17
  i have a string named as remark in  VB . it conatins more than 1000 letters(variable)...
How can i split this string to another string ...each having  a maximum of 250 letters....
i mean i want the string in rem1,rem2,rem3....and rem1 should conatin 250 letters and rem2 -250 and rem3 ---250...etc...if len(rem3) is < 250 then it ok...no need to add the string to make it 250 len string...help me immediately ...i am not able to use the normal split function...is there any other methods for doing that..??/
thanks in advance
Question by:bushairkp
1 Comment
LVL 97

Accepted Solution

Lee W, MVP earned 100 total points
ID: 12561190
Something like this should work - I'm currently unable to test it - you might have to tweak the numers a little, define some variables, etc, but I believe this will do what you ask.

For x = 0 to (Len(mystring) / 250) - 1
    rem(x) = Mid(mystring, (x * 250), 250)
Next x

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Screencast - Getting to Know the Pipeline

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question