Preserving number format in userform textbox

  • Thread starter Thread starter Roger on Excel
  • Start date Start date
R

Roger on Excel

Is there a way to preserve the number format that is in a userform text box
to be the same as the formatting in the sheet source cell

For example 85% in the sheet (percent format) reads 0.85 in the text box
that reads from that cell

Can anyone help?
 
Try

Set rng = Range("A1")
TextBox1 = Format(rng,rng.NumberFormat)

If this post helps click Yes
 
You can always assign the Text property of the range to the TextBox...

TextBox1.Value = Range("A1").Text
 
Back
Top