Formatting equation output
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 |
Formatting equation output
Try this:
lblSalesAmount.Caption = Format(((txtPOAmount.Value * ((txtPercentOffice.Value) / 100))) * (txtPercentSales.Value / 100), "$#,##0.00") -IA -----Original Message----- 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 . |
All times are GMT +1. The time now is 02:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com