Friends I have a problem in totalling the variable .When I use my code I am not getting the answer as I expected. My code is as below
Jsharbal = Format$(TRS("Sharbal"), "#,##0.00")
Jworkbal = Format$(TRS("workbal"), "#,##0.00")
Jsalabal = Format$(TRS("Salabal"), "#,##0.00")
Jprofit = Format$(TRS("Prflbal"), "#,##0.00")
CRTOTAL = (Val(Jsharbal.Caption) + Val(Jworkbal.Caption) + Val(Jsalabal.Caption)+ Val(Jprofit.Caption))
LblCrtotal.Caption = Format$(CRTOTAL, "#,##0.00")
the values of my above variables are 900,000.00,4,500.00,30,000.00,10,000.00 When working I am getting the answer as 944.00 Instead of 944,500.00 Why this mistake. and if I am changing the above code like this
Jsharbal = TRS("Sharbal")
Jworkbal = TRS("workbal")
Jsalabal = TRS("Salabal")
Jprofit = TRS("Prflbal")
CRTOTAL = (Val(Jsharbal.Caption) + Val(Jworkbal.Caption) + Val(Jsalabal.Caption)+ Val(Jprofit.Caption))
LblCrtotal.Caption = Format$(CRTOTAL, "#,##0.00")
I am getting the answer as 944,500.00 As I desired.But here the values of the variables are changed like trhis 900000,4500,30000,10000 I want the thoudsand separator in all the values ..Any body help me please