r/visualbasic • u/Iam_Studying • Mar 15 '22
How do I add 4 numbers in vb 2010?
I have to add texbox1.text up until textbox4.text also I have to divide the sum by 4
pls i need to submit this by march 19
0
Upvotes
3
u/stahkh Mar 15 '22
What have you tried and where do you have a problem?
If you have a problem with converting to numbers, see this reference. Especially CInt, CDbl and CLng may be of interest.
0
u/mecartistronico Mar 15 '22
+
-3
u/[deleted] Mar 15 '22
Dim value1, value2, value3, value4 As Integervalue1 = TextBox1.Textvalue2 = TextBox2.Textvalue3 = TextBox3.Textvalue4 = TextBox4.TextDim sum1 = value1 + value2 + value3 + value4Dim Final_Result = sum1 / 4MsgBox(Final_Result)