Solved

How do i separate these words

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

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…
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…
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 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…

773 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