+ Reply to Thread
Results 1 to 2 of 2

Easy One - Convert user text in UserForm TextBox to Currency

Hybrid View

DonJuan85 Easy One - Convert user text... 06-29-2015, 05:43 PM
mikerickson Re: Easy One - Convert user... 06-29-2015, 07:00 PM
  1. #1
    Registered User
    Join Date
    06-28-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    39

    Easy One - Convert user text in UserForm TextBox to Currency

    Hi

    I am trying to get textbox25 to automatically format the users input as £0,000 but no code that I try seems to work.

    Thanks

    Don

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Easy One - Convert user text in UserForm TextBox to Currency

    I wouldn't do that, since you have to remove the pound sign before doing any calculations. I would put a lable infront of the textbox with a pound sign in it.

    If you decide to go with that approach, you could so something like
    Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
        With TextBox1
            .Text = Format(Val(Replace(.Text, "$", vbNullString)), " $ #,##0.00")
        End With
    End Sub
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Format Textbox on UserForm as Currency
    By paulsouthampton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2015, 11:37 AM
  2. [SOLVED] Easy One - Convert user text in UserForm TextBox to Currency
    By DonJuan85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2015, 01:42 PM
  3. [SOLVED] Storing userform textbox inputs as currency in an array
    By CaptainK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2014, 10:13 AM
  4. How do you format a TextBox on a UserForm as Currency
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2011, 11:08 PM
  5. is userform textbox input by user default TEXT?
    By JohnSeito in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2009, 07:46 AM

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