-
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
-
Change these lines:
txtData.Text = strMsg --> txtData.Text = txtData & vbCrLf & strMsg
txtData.Text = "no luck" --> txtData.Text = txtData.Text & vbCrLf & "no luck" & vbCrLf
-
-