I have found some code ti help me sum up the values of text boxes but it doesnt work - gives a type mismatch error - is anyone able to assist??
I want to sum up the values I type into text boxes called txtBld, txtFix etc etc. The values I enter are percentage values (ie 45% entered as "45"). This ones puzzled for some time and I cant get past the error message
Private Sub Update_txtTot()
Dim Total As Currency
With Me
Total = CCur(.txtBld) + CCur(.txtFix) + CCur(.txtMot) + CCur(.txtPla) + CCur(.txtTrk) + CCur(.txtCom) + CCur(.txtOff) + CCur(.txtOhd)
.txtTot = Format(Total / 100, "0.00%")
End With
End Sub
I want to sum up the values I type into text boxes called txtBld, txtFix etc etc. The values I enter are percentage values (ie 45% entered as "45"). This ones puzzled for some time and I cant get past the error message
Private Sub Update_txtTot()
Dim Total As Currency
With Me
Total = CCur(.txtBld) + CCur(.txtFix) + CCur(.txtMot) + CCur(.txtPla) + CCur(.txtTrk) + CCur(.txtCom) + CCur(.txtOff) + CCur(.txtOhd)
.txtTot = Format(Total / 100, "0.00%")
End With
End Sub