Results 1 to 4 of 4

Thread: [RESOLVED] VB6 format number

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2006
    Location
    Paris
    Posts
    301

    Resolved [RESOLVED] VB6 format number

    Why VB6 writes decimals like this : .2 instead of 0.2 it really annoys me.
    How can I fix it ?

  2. #2
    Fanatic Member Mxjerrett's Avatar
    Join Date
    Apr 2006
    Location
    Oklahoma
    Posts
    939

    Re: VB6 format number

    Well here is a rough version

    Code:
    Text2 = Format(Text1, ".#############")

    If a post has been helpful please rate it.
    If your question has been answered, pull down the tread tools and mark it as resolved.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: VB6 format number

    Quote Originally Posted by Mxjerrett
    Well here is a rough version

    Code:
    Text2 = Format(Text1, ".#############")
    That's exactly what he doesn't want to have happen.

    Try

    Text2 = Format(Text1, "0.0")

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2006
    Location
    Paris
    Posts
    301

    Re: VB6 format number

    Thanks !

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