+ Reply to Thread
Results 1 to 3 of 3

reducing decimal points when returning value in msgbox

  1. #1
    Registered User
    Join Date
    12-01-2006
    Posts
    15

    reducing decimal points when returning value in msgbox

    Hi, I cant find anywhere how i go about limiting the number of decimals my returned value displays in a msg box ie i want only 2 ...not 9.any suggestions would be appreciated!!

    tan :-)

  2. #2
    Registered User
    Join Date
    10-03-2006
    Posts
    17
    Hi,

    Well ... don't know if this is what you were looking for, but I'll try anyway:

    try using this:

    Sub fun()
    Number = 2.12345
    MsgBox (Format(Number, "###0.00"))
    End Sub

  3. #3
    Registered User
    Join Date
    12-01-2006
    Posts
    15
    just found the solution!

    Round(the_value, 2)

    thanks for help anyways!!

+ 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.6.0 RC 1