I have the following code where I am trying to display the total as a decimal number.
Dim thetotal As Single
thetotal = num(1) + num(2) + num(3) + num(4) + num(5) + num(6) + num(7) + num(8) + num(9) + num(10)
'Duties total rating
dutiesrating.Text = thetotal
'Number filled out
divmajorduties.Text = totalfilled
Dim theaverage As Decimal
Dim totalaverage As Decimal
theaverage = thetotal \ totalfilled
totalaverage = FormatNumber(theaverage, 2)
' Shows the average
averageduties.Text = totalaverage
If I do an example. thetotal holds 26.5
totalfilled holds 7
totalaverage holds 3
I want totalaverage to hold 3.78
I just can't get this to display the decimal.
Dim thetotal As Single
thetotal = num(1) + num(2) + num(3) + num(4) + num(5) + num(6) + num(7) + num(8) + num(9) + num(10)
'Duties total rating
dutiesrating.Text = thetotal
'Number filled out
divmajorduties.Text = totalfilled
Dim theaverage As Decimal
Dim totalaverage As Decimal
theaverage = thetotal \ totalfilled
totalaverage = FormatNumber(theaverage, 2)
' Shows the average
averageduties.Text = totalaverage
If I do an example. thetotal holds 26.5
totalfilled holds 7
totalaverage holds 3
I want totalaverage to hold 3.78
I just can't get this to display the decimal.