+ Reply to Thread
Results 1 to 2 of 2

Thread: how to format a label to 2 decimal places

  1. #1
    gem
    Guest

    how to format a label to 2 decimal places

    i have a label in an excel userform and need to format it as the numbers are
    showing up as 139.9 when it should be 139.90 how do i do this?
    thanks in advance

  2. #2
    Jim Thomlinson
    Guest

    RE: how to format a label to 2 decimal places

    Add a blank form and then drop a text box and a lebel onto the form. add this
    code to the form. Run the form and type a number into the text box...

    Private Sub TextBox1_Change()
    If IsNumeric(TextBox1.Text) Then _
    Label1.Caption = Format(TextBox1.Text, "#,##0.00")
    End Sub
    --
    HTH...

    Jim Thomlinson


    "gem" wrote:

    > i have a label in an excel userform and need to format it as the numbers are
    > showing up as 139.9 when it should be 139.90 how do i do this?
    > thanks in advance


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0