Pgmer
Practically a Posting Shark
881 posts since Apr 2008
Reputation Points: 60
Solved Threads: 158
Skill Endorsements: 1
When doing the maths part convert the input text to type double:
Sub Addition()
dim Answer as Double
If IsNumeric(input1.text) AndAlso Isnumeric(input2.text) then
Answer = cDbl(input1.text) + cDbl(input2.Text)
Output.Text = Answer
Else
Output.Text ="ERROR NON NUMERIC ENTRY"
END IF
End Sub
Or else when faced with "250" + "7.5" the code may convert the "250" to an Integer and the "7.5" to a double with the erratic results you are getting...
"Always add apples to apples and oranges to oranges or else you get fruit salad."
G_Waddell
Practically a Master Poster
623 posts since Nov 2009
Reputation Points: 107
Solved Threads: 95
Skill Endorsements: 6
See my post earlier, you should convert the values to doubles to ensure you are adding like with like.
G_Waddell
Practically a Master Poster
623 posts since Nov 2009
Reputation Points: 107
Solved Threads: 95
Skill Endorsements: 6
Question Answered as of 10 Months Ago by
sepp2k,
G_Waddell
and
Pgmer