Results 1 to 5 of 5

Thread: quick easy question!

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    52

    quick easy question!

    I have a textbox and was wondering how to get the output to look like this :

    123.45
    456.21
    566.33
    849.90

    basically print every calcuation on a new line. as it stands now my output is just the last one (849.90)

    heres my code:

    Private Sub Command1_Click()
    Dim intRow As Integer

    For intRow = 1 To 4
    dataX = MSFlexGrid1.TextMatrix(intRow, 1)
    intRow = intRow + 1
    data2X = MSFlexGrid1.TextMatrix(intRow, 1)
    diffX = data2X - dataX
    Text1.Text = diffX
    Next
    End Sub

    you dont have to modify my code, could someone just provide an example??

    thanks!!!!!!!!!!

  2. #2
    Member
    Join Date
    May 2003
    Posts
    32
    You start a new line in a text box with vbCrlf :

    Code:
    For i=1 To 4
      Text1.Text=Text1.Text & i & vbCrlf
    Next
    You have to set the MultiLine property for the TextBox to True.

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    52
    thanks got it, i also figured out that a picture box is much better just have to use the print method

  4. #4

  5. #5
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    or a label with border set to Fixed Single. unless you need the thing to be on top of other stuff like buttons.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

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