Hi everyone,
The code here works. But, I can never get the value (displayed in a userform label) to be formatted numerically with commas and 2 decimals (e.g. 1,500.00). I tried every code and placed it everywhere but fails everytime. A simple addition of 1000 + 1500 equals 2001.00. I don't know what else to do and it's been so long now. I would appreciate some help, please.
NewRetailAmt = Me.tbx_rtlamt.Value * Me.tbx_Qty.Value
lbl_sbtot.Caption = Val(lbl_sbtot.Caption) + NewRetailAmt
Legend:
NewRetailAmt - is a variable
tbx_rtlamt - textbox with numeric input
tbx_Qty - textbox with numeric input as multiplier
lbl_sbtot - label to display sum
I tried these lines of code with no luck:
'Me.lbl_sbtot.Value = Format(Me.lbl_sbtot, "#,##0.00")
Or
'lbl_sbtot = Format(lbl_sbtot, "Standard")
Best regards, -m.
The code here works. But, I can never get the value (displayed in a userform label) to be formatted numerically with commas and 2 decimals (e.g. 1,500.00). I tried every code and placed it everywhere but fails everytime. A simple addition of 1000 + 1500 equals 2001.00. I don't know what else to do and it's been so long now. I would appreciate some help, please.
NewRetailAmt = Me.tbx_rtlamt.Value * Me.tbx_Qty.Value
lbl_sbtot.Caption = Val(lbl_sbtot.Caption) + NewRetailAmt
Legend:
NewRetailAmt - is a variable
tbx_rtlamt - textbox with numeric input
tbx_Qty - textbox with numeric input as multiplier
lbl_sbtot - label to display sum
I tried these lines of code with no luck:
'Me.lbl_sbtot.Value = Format(Me.lbl_sbtot, "#,##0.00")
Or
'lbl_sbtot = Format(lbl_sbtot, "Standard")
Best regards, -m.
Last edited: