MSFN Forum: Simple VB 6 stuff... - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simple VB 6 stuff... I'm clueless. Rate Topic: -----

#1 User is offline   colemancb 

  • VIVA LA RESISTANCE!
  • PipPip
  • Group: Members
  • Posts: 121
  • Joined: 27-May 05

Posted 10 September 2005 - 07:54 PM

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!


#2 User is offline   RayOK 

  • Member
  • PipPip
  • Group: Members
  • Posts: 152
  • Joined: 21-September 03

Posted 29 September 2005 - 05:59 PM

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

This post has been edited by RayOK: 29 September 2005 - 06:00 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy