Format TextBox for percentage - SOLVED

  • Hi all


    I'm currently teaching myself to build a rather complex userform and I'm hitting a wall with something that should be really simple.


    All of the calculations are done in a worksheet with the answers being displayed in text boxes in a multipage userform.


    I have the following:


    Code
    TextBox50 = Sheet3.Range("P2").Value
    TextBox51 = Sheet3.Range("P3").Value
    TextBox52 = Sheet3.Range("P4").Value



    This works absolutely fine, however I want TextBox51 to display as a percentage. The source data already is, but I understand from searching that it's not just as simple as changing an option in the text box.


    All the solutions I've found so far seem to be for far more complex problems than I have, and I don't know enough about VBA coding to pluck out the answers I need.


    Any help is much appreciated!

  • Re: Format TextBox for percentage


    Hi Willanss1988


    Perhaps like this...

    Code
    TextBox50 = Format(Sheet3.Range("P2").Value, "0.00%")


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!