Results 1 to 4 of 4

Thread: txt box decimal to long Resolved

  1. #1

    Thread Starter
    Lively Member Ihasn's Avatar
    Join Date
    Oct 2002
    Location
    Washington, DC
    Posts
    82

    txt box decimal to long Resolved

    How do i get VB to round up a decimal?
    Last edited by Ihasn; Mar 15th, 2003 at 12:26 AM.
    Patrick Pierson

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    VB Code:
    1. Private Sub Command1_Click()
    2. MsgBox (Round(Text1.Text, "0"))
    3. End Sub
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Lively Member Ihasn's Avatar
    Join Date
    Oct 2002
    Location
    Washington, DC
    Posts
    82

    Thanks

    Thanks
    Patrick Pierson

  4. #4
    Lively Member Deucy's Avatar
    Join Date
    Mar 2003
    Location
    Cali
    Posts
    85
    i don't what Nightwalker meant by that (clarify it for me).. but i would do it this way, tho:

    Text1.Text = Round(Val(Text1.Text), 0)

    this would round up the value of the txt box to 0 decimal places..

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