Formatting equation output

  • Thread starter Thread starter David Thurston
  • Start date Start date
D

David Thurston

Hey there!~

I have a label that shows the result of a calculation that
is performed in the code. Formula is:

lblSalesAmount.Caption = ("$" & ((txtPOAmount.Value *
((txtPercentOffice.Value) / 100))) *
(txtPercentSales.Value / 100))

I need to know how to format this so that when the label
shows the result it is only two decimal places.

Thanks

David
 
Try this:

lblSalesAmount.Caption = Format(((txtPOAmount.Value *
((txtPercentOffice.Value) / 100))) *
(txtPercentSales.Value / 100), "$#,##0.00")

-IA
 
Back
Top