Results 1 to 3 of 3

Thread: Why ISnt this Working???[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    111

    Why ISnt this Working???[RESOLVED]

    Heres the COde

    VB Code:
    1. Private Sub cmdSaveInfo_Click()
    2.  Dim strInfo() As String ' My Array for Data
    3.  Dim strData As String ' Variable that Holds Data
    4.  Dim i As Integer
    5.  Dim x As Integer
    6.  
    7.   strData = "Zero One Two Three FOur Five Six Seven Eight Nine"
    8.    strInfo = Split(strData, " ")
    9.    For i = 0 To txtInfo.UBound
    10.      For x = 1 To UBound(strInfo)
    11.        txtInfo(i).Text = strInfo(x)
    12.      Next x
    13.    Next i
    14.  
    15. End Sub

    Note its only adding the Word "Nine" to all fo the textboxes instead of splitting each word and adding each word....

    vbMarkO

    EDIT#################################

    I figured it out this gets it done

    VB Code:
    1. Private Sub cmdSaveInfo_Click()
    2.  Dim strInfo() As String ' My Array for Data
    3.  Dim strData As String ' Variable that Holds Data
    4.  Dim i As Integer
    5.  
    6.  
    7.   For i = 0 To txtInfo.UBound
    8.      strData = strData & txtInfo(i).Text & " "
    9.    Next i
    10.    For i = 0 To txtInfo.UBound
    11.     txtInfo(i) = ""
    12.    Next i
    13.    strInfo = Split(strData, Space(1))
    14.    
    15.    For i = 0 To txtInfo.UBound
    16.      txtInfo(i).Text = strInfo(i)
    17.      
    18.    Next i
    19.  
    20. End Sub
    Last edited by vbMarkO; Mar 22nd, 2004 at 11:12 PM.

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