I am writing a sub to calculate a simple addition and multiplication between data entered by my users but for some reason it doesn't work, and I know why but I don't how to fix it.
my input fields is formated right after the user leave the box to put the number entered with a "$" sign in front and change the number with the proper decimal ,but then when I try to do my calculation I think the "&" sign gets pass in the formula and mess everything . so here is the form and the code.
the formula should take the "flat rate" + "labor amount"+....and =to Quoted Amount
my formula might do a little more than just adding , but if I understand how I can format my text field and do some calculation then I can figure out the rest.
Private Sub txtFlatRate_AfterUpdate()
txtFlatRate = "$" & FormatNumber(txtFlatRate)
Private Sub txtFlatRate_Change()
txtQuoteAmount.Value = Val(txtFlatRate.Value)
'+ Val(txtLabor) + Val(txtParts) + Val(txtMachine) + Val(txtExpedite)
'This calculate the rush fee of 25% max $2000
txtRushFee = ((Val(txtFlatRate) + Val(txtLabor) + Val(txtParts) + Val(txtMachine) + Val(txtExpedite)) * 25) / 100
If txtRushFee > 2000 Then
txtRushFee = 2000
txtQuoteRush = "$" & FormatNumber(FormatNumber(txtQuoteAmount) + Val(txtRushFee))
binChanged = True