Solved

Reading and Modifying textbox output vb6

Posted on 2007-12-03
2
265 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

749 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