Solved

Reading and Modifying textbox output vb6

Posted on 2007-12-03
2
262 Views
Last Modified: 2012-05-05
Lets say I have 4 text boxes
They read-
Text1.text -      John James Doe

I want text2 to read    -      John
text3                           -      James
text4                           -      Doe

Now text1.text may read-   Kim Sara Smith
The name was an example.  Basically what is the coding for everything to the right of the 1st space, coding for 2nd space to 1st space, and 2nd space to right end?

This is for VB6
Thanks in advanced
0
Comment
Question by:daneburr
  • 2
2 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 20399250
text1.text = Replace(text1.text, " ", vbcrlf)
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 50 total points
ID: 20399279
Sorry. I misread the question
Dim strTexts() as string
strTexts() = split (text1.text, " ")
text2.text = strTexts(0)
text3.text = strTexts(1)
text4.text = strTexts(2)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

895 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

15 Experts available now in Live!

Get 1:1 Help Now