I am working with multiple sheets but I do not know how to popoulate a textbox from Sheet2.
Sheet2:C22
It does not work.
I am working with multiple sheets but I do not know how to popoulate a textbox from Sheet2.
Sheet2:C22
It does not work.
I am using the following code to format a textbox. Does not work at all.
Private Sub UserForm_Initialize()
TextBox1.Text = Format((TextBox1.Value),"$#,##0")
End Sub
Any thoughts?
While not all cell numberformats will work like this, many will.
[vba] Private Sub UserForm_Initialize()
TextBox1.Text = Format(Sheet2.Range("C22").Value, Sheet2.Range("C22").NumberFormat)
'or
' TextBox1.Text = Sheet2.Range("C22").Text
End Sub[/vba]