Reading Each line in string or text box

Hi,
I have an application which uses a class to create pdf documents  from a text box. But the class required that each line should be inserted separately as:

  objpdf.PDFTextOut line, 1, 1
  objpdf.PDFTextOut "lin2", 1, 2
  objpdf.PDFTextOut "line 3", 1,3

If I use objpdf.PDFTextOut text1.text command now it reads only the first line of text1.text not the rest.

Now I want a mechanism which can read each line of text1.text.

Can any one help me in this regards

Thanks
aib_itAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jorge PaulinoIT Pro/DeveloperCommented:
>> Now I want a mechanism which can read each line of text1.text.
Try this way:


        For Each line As String In Me.TextBox1.Lines
            Debug.WriteLine(line)
        Next

Open in new window

0
Jorge PaulinoIT Pro/DeveloperCommented:
Opps! It's VB6
 

    Dim line As Variant
    Dim lines() As String
    lines = Split(Me.TextBox1.Text, vbNewLine)
    
    For Each line In lines
      Debug.Print line
    Next

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.