Results 1 to 4 of 4

Thread: Text boxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2
    At the risk of opening myself to ridicule can anybody explain why this does not work? Basically my array is full and it prints out the data in the textbox but on each successive time through the loop it overwrites the last entry. I thought that the vbcrlf constant was meant to prevent this? (i have set the multiline property to true for the text box). Your help or advice is much appreciated!

    Private Sub CmdFind_Click()
    Dim strcombo As String
    Dim strmMsg As String
    strcombo = Combo1.Text
    Print strcombo
    dTotalTime = CDbl(txtTotaltime.Text)
    dTimeInterval = CDbl(txtTimeInterval.Text)

    dY = dTotalTime / dTimeInterval
    iLoopMax = CInt(dY)
    Select Case strcombo

    Case Is = "IK"
    For iLoopCount = 1 To iLoopMax
    strMsg = (VoltageArray(15, iLoopCount))
    strMsg = strMsg & vbCrLf
    txtData.Text = strMsg
    Refresh
    Next iLoopCount

    Case Else
    txtData.Text = "no luck"

    End Select
    End Sub

  2. #2
    Guest
    Change these lines:
    txtData.Text = strMsg --> txtData.Text = txtData & vbCrLf & strMsg
    txtData.Text = "no luck" --> txtData.Text = txtData.Text & vbCrLf & "no luck" & vbCrLf

  3. #3
    Guest
    Doh! he beat me to it.

  4. #4
    Guest
    Sorry

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