format textbox in userform

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

Guest

Got me stuck. I have some textboxes in a userform that I would like to show
in certain various formats. Most are linked to a control source and I
"thought" if I formatted the controlsource....but not so.

Any help in how to do this would be appreciated
Tia

(e-mail address removed)
 
I think I'd drop the controlsource and just format it the way I wanted:

Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Format(Worksheets("sheet1").Range("a1").Value, "$0.00")
End Sub

or even
Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Worksheets("sheet1").Range("a1").Text
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top