Format Textbox with formula
Posted by Dave on October 23, 2001 11:56 AM
Hello again, I'd like to thank everyone for the help. This group is Great.
Here's the problem I have two textboxes on a Userform the value
of the first is used in a formula to get the value of second. I have the formula
in a cell and run this macro to copy the value to another cell which is linked
to the second textbox. This works fine(even changing the value in the first from
the textbox or worksheet)
I would like to Format the second Textbox as I do the first (the formating is
correct in the first).
BUT This is not working......please help.
Private Sub Worksheet_Calculate()
Application.ScreenUpdating = False
Sheets("Sheet1").Range("c8").Copy
Sheets("Sheet1").Range("d8").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub
Private Sub UserForm_Initialize()
Me.TextBox1 = Format(Me.TextBox1, "#,##0")
Me.TextBox2 = Format(Me.TextBox2, "#,##0")
End Sub
Private Sub TextBox1_Change()
Me.TextBox1 = Format(Me.TextBox1, "#,##0")
End Sub
Private Sub TextBox2_Change()
Me.TextBox2 = Format(Me.TextBox2, "#,##0")
End Sub