I have a 2 textboxes in a userform. One (txtCPU1) will display the result of a lookup, and the other (txtCost1) will display the result of a calculation.. How can I format the textboxs to have the values be in currency (ie $24.45) with the dollar sign and 2 decimals.
Here is the code right now for the change:
The txtQty1 box is already limited to to a number, and the lookup value is a currency amount from a worksheet. Thanks for your help.
Here is the code right now for the change:
Code:
Private Sub txtCPU1_Change()
If txtQty1.Value = "" Then Exit Sub
If txtCPU1.Value = "" Then Exit Sub
txtCost1.Value = CDbl(txtQty1.Value) * CDbl(txtCPU1.Value)
End Sub