Jump to content

Recommended Posts

Posted

I have this pasted into a text box in my VB applications.

===========

[RS]

9828382

my_holiday_pictures.2.rar

===========

I would like to know how to seperate all of this by...

a. throwing out the ============ lines.

b. taking the [RS], 2827273, and the filenamr and putting them all in seperate labels.

How would I go about doing this by the pressing of one button? Being able to do it backwards would be great too, but not as important.

Thank!

  • 3 weeks later...

Posted (edited)

This will work for you :)

I'll be happy to answer how it works, or any other VB 6 questions..

Private Sub Command1_Click()
   Dim strings() As String
   
   strings = Split(Text1.Text, vbNewLine)
   
   Label1.Caption = strings(1)
   Label2.Caption = strings(2)
   Label3.Caption = strings(3)
End Sub

Edited by RayOK

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...