split function

Posted on 2004-11-11
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 need to add the string to make it 250 len me immediately ...i am not able to use the normal split there any other methods for doing that..??/
thanks in advance
Question by:bushairkp
    1 Comment
    LVL 95

    Accepted Solution

    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

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now