Solved

Reading and Modifying textbox output vb6

Posted on 2007-12-03
2
264 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

828 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