+ Reply to Thread
Results 1 to 6 of 6

Currency symbol always in box

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Currency symbol always in box

    Hi

    I'm fairly new to vba and I'm currently creating a user form. Is it possible to have the currency symbol permantly in the text box? So far I have it so when the user opens to input it reads "£0.00" but when the user clicks on the box to add information I want the 0.00 part to disappear leaving the £ sign only, and also so the £ cannot be removed.... Is this possible?

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Currency symbol always in box

    You can easily set the box to have a value of "£" when the userform is initialized. making it so the £ is tricky. Why not just have 2 boxes, 1 with the £ and the other for data entry?

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Currency symbol always in box

    Hi

    Thanks for your reply, I managed to do it eventually but rather than having a £ sign there all the time I used the if function on the after update and enter cosings so on the after update it shows "enter value here" and on the enter it shows "£", but it still is not there permantly, the £ can be deleted out.

    1 step at the time I suppose, I'm picking it up slowly haha

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Currency symbol always in box

    Hi

    In that scenario I use a label to hold the Currency symbol. It makes all the coding a lot simpler.

    Formated to match your textbox, it looks like part of the box but cannot be deleted.

  5. #5
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Currency symbol always in box

    Ah, yes i see what you mean, as long as the cell this information is going into is formatted to "currency" then it doesnt matter if the "£" is in the text box at all

    Thank you

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Currency symbol always in box

    Hi

    In that scenario I use a label to hold the Currency symbol. It makes all the coding a lot simpler.

    Formated to match your textbox, it looks like part of the box but cannot be deleted.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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