format cell reference in a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I format the resulting number that is displayed in a text box? I
have used the linked cell property to define that cell C17 is what appears in
the text box. Cell C17 is a percentage. Currently it will display as
3.3333333333333E-2 for 3.33%. I would like it to appear in the text box as
3.33%. How do I limit the decimal places and add the % sign?

Thanks
 
Use the change event to reformat the textbox:

Private Sub Textbox1_Change()
Textbox1.Value = Format(Textbox1.Value,"0.00%")
End Sub
 
Thanks that did it!

Tom Ogilvy said:
Use the change event to reformat the textbox:

Private Sub Textbox1_Change()
Textbox1.Value = Format(Textbox1.Value,"0.00%")
End Sub
 
Back
Top