Results 1 to 6 of 6

Thread: Format Number

  1. #1

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858

    Format Number

    i want to change the format of the number in a textbox

    to have a thousand separator.

    i.e. the number 12345.78 should change to 12,345.78 .

    Problem is , by using format(num,"#,###")

    12345.78 becomes 12346 . I want to have the decimal part as it is.


    Thanks
    Last edited by vishalmarya; Feb 20th, 2003 at 02:52 PM.

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    did you try:

    VB Code:
    1. Format(num, "#,###.##")

    ?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    singpaore
    Posts
    42

    format

    use this format
    format$(text1,"###,###,##0.00")

  5. #5

  6. #6

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858
    using Format(num, "#,###.##") gives a decimal point .


    i.e. , if the number is 10000 result is 10,000. ( see decimal at the end) .

    i have solved the problem by checking if the number contains decimal . if it does I use : "#,###" , and if doesn't i use the above one.

    No General format string i guess ?

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