Results 1 to 37 of 37

Thread: [RESOLVED] VB6/ Number to Words / 66 digits

Threaded View

  1. #28
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: [RESOLVED] VB6/ Number to Words / 66 digits

    I'm not belittling anyone else's approach, in fact I used it as basis in the interest of providing other members with an updated approach.

    As to the decimals, I still believe its case to case... it could be units based such as cents, microns, nanoseconds, etc. The module can be updated to handle such special cases, just create an appropriate procedure and call it. Such as accepting strDecimal as an argument then converting it to microns (up to implementor if the new decimals from shift to microns will be dropped).


    EDIT: I updated the source for converting numbers to their word (or english or spelled) equivalents. Made it leaner and it now uses just three procedures. There is also the option to suppress prompting the user if errors were encountered.

    Attached is the update. Feel free to debug and/or comment.

    EDIT 2008-08-29: Previous update accidentally shifted to Trim instead of LTrim in removing leading zeroes. Code updated. Thanks Keithuk for heads up
    Attached Files Attached Files
    Last edited by leinad31; Aug 29th, 2008 at 08:10 AM.

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