+ Reply to Thread
Results 1 to 6 of 6

How do you format a TextBox on a UserForm as Currency

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    How do you format a TextBox on a UserForm as Currency

    I have a CommandButton on a sheet that will copy a dollar value in C15 and place it in a TextBox (txtPrice1) on a UserForm. The value in C15 is, for example, $7,000.00. When it is displayed on the UserForm, it is simply 7000. I want the TextBox to display $7,000.00 also. I would like a way to just permanently format the TextBox as currency (or accounting), as opposed to carrying over the format from C15, if possible. Hopefully someone can show me a simple way to do this. I'm pretty much a novice, if I need to add code, can you tell where to put it. An example of my workbook is attached. Thanks in advance.
    Attached Files Attached Files
    Last edited by rkjudy; 01-09-2011 at 10:13 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How do you format a TextBox on a UserForm as Currency

    Hi rkjudy

    Perhaps like this
    Please Login or Register  to view this content.
    Far as I know, a TextBox is just that...text...can't be "permanently" formated otherwise.

    John
    Last edited by jaslake; 01-09-2011 at 10:46 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How do you format a TextBox on a UserForm as Currency

    Please Login or Register  to view this content.
    Last edited by Palmetto; 01-09-2011 at 10:51 PM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: How do you format a TextBox on a UserForm as Currency

    Worked perfect. One more question. What if I had several TextBoxes (ie. txtPrice1, txtPrice2, txtPrice3.....txtPrice15). How would I format all of these as currency with the smallest amount of code?

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How do you format a TextBox on a UserForm as Currency

    Hi rkjudy

    In your sample file txtPrice1 is getting populated with this
    Please Login or Register  to view this content.
    in the Initialize Event. How are txtPrice2, txtPrice3.....txtPrice15 getting populated and where are they on your UserForm? Don't see them there.

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How do you format a TextBox on a UserForm as Currency

    Please Login or Register  to view this content.

+ 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