Solved

How do i separate these words

Posted on 2004-08-14
2
136 Views
Last Modified: 2010-08-05
Im trying to separate this message into 3 parts. they have a space between them, for example:

message= Hi, I'm Andrew.

how do i separate this to:
text1=Hi,
Text2=I'm
text3=Andrew.
0
Comment
Question by:andyakira
2 Comments
 
LVL 14

Accepted Solution

by:
Farzad Akbarnejad earned 250 total points
ID: 11798963
Hi,
    Dim message As String
   
    Dim text1 As String
    Dim text2 As String
    Dim text3 As String
   
    Dim arrText() As String
   
   
    message = "Hi, I'm Andrew."
    arrText = Split(message, " ")
   
    text1 = arrText(0)
    text2 = arrText(1)
    text3 = arrText(2)
   
    MsgBox text1 & vbCrLf & text2 & vbCrLf & text3


-FA
0
 

Author Comment

by:andyakira
ID: 11798990
tyvm
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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…

929 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

14 Experts available now in Live!

Get 1:1 Help Now