Solved

How do i separate these words

Posted on 2004-08-14
2
138 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

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

808 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