Results 1 to 4 of 4

Thread: *****------Counting Spaces----****

  1. #1

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    don't forget tripple and on and on.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    Im sorry, please explain more what you want.

  3. #3
    Guest
    With a little rearranging of Martin Liss' code:

    Code:
    Private Sub Command1_Click()
    
        Dim vArray As Variant
        Dim intIndex As Integer
        Dim intSpaces As Integer
        
        vArray = Split(Text1.Text, " ")
        For intIndex = 0 To UBound(vArray)
            intSpaces = intSpaces + 1
        Next
        MsgBox "Spaces = " & intSpaces - 1
    
    End Sub

  4. #4

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    using Matthew's code:
    If text1.text = me 4 spaces me 10 spaces me

    the code will give you 14 spaces which is correct but
    you can't count the words as there are only 3 words.

    So as you can see, it is no solution. Your first answer is the best one.

    Ps..for future reference, you should post the one question and stay with it so people can know what is happening insead of making 3 or 4 different post concerning questions as per the answers in your first post.

    later
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width