+ Reply to Thread
Results 1 to 4 of 4

How to Format Currency in Textbox??

  1. #1
    Registered User
    Join Date
    03-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    How to Format Currency in Textbox??

    I have tried this code in Private Sub Textbox1_Change():
    Please Login or Register  to view this content.
    and I have Also tried this code, also in Private Sub Textbox1_Change():
    Please Login or Register  to view this content.
    both sort of work, but seem very crude. Any ideas to make it less crude, more user-friendly, where you don't have to be careful where to put cursor and enter more numbers without it seeming "locked up", if that makes sense?? And where I would be able to edit the .xx cents instead of just .00 hardcoded??

    Thanks for any ideas to get this to work/work better!!
    Last edited by MrsTaylor; 03-12-2012 at 11:47 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to Format Currency in Textbox??

    Hi,

    Does this link help?
    http://answers.microsoft.com/en-us/o...3-5801d7bd6d7e
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to Format Currency in Textbox??

    Hello MrsTaylor,

    Welcome to the Forum!

    Move the code below from the "Change" event to the "AfterUpdate" event.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    10-10-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    88

    Re: How to Format Currency in Textbox??

    try this:

    TextBox1.Value = Format(Me.TextBox1.Value, "$##,###.00")

+ 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