I'm new to complex maths and equations in vb, even the basic maths below does not work correctly.
So can any one advise on the best data for for me to use e.g. below decimal for math calcs
Help me put the below correct.
Private Sub z()
Dim ringheight As Decimal
ringheight = CType(Me.txtringheight.Text, Decimal)
Dim slope As Decimal
slope = CType(Me.txtangslope.Text, Decimal)
Dim siloring As Decimal
siloring = (Convert.ToDecimal(cbosilorings.Text))
Dim silodia As Decimal
silodia = (Convert.ToDecimal(cbosilodia.Text)) / 2
lbzh.Text = (siloring * ringheight) + ((silodia / 2) * Math.Tan(slope))
End Sub
Cheers
Ross