D
Derek
I am trying to add the text of several textboxes as a sum
using the + sign but even converting to integer it is
concatenating. Any help would be greatly appreciated.
Dim price1 As Integer
Dim price2 As Integer
Dim price3 As Integer
Dim price4 As Integer
Dim price5 As Integer
Dim TotalPrice As Integer
price1 = CType(txtcost1.Text, Integer)
price2 = CType(txtcost2.Text, Integer)
price3 = CType(txtcost3.Text, Integer)
price4 = CType(txtcost4.Text, Integer)
price5 = CType(txtcost5.Text, Integer)
TotalPrice = price1 + price2 + price3 + price4 +
price5
txtEC.Text = TotalPrice
ShowFields()
using the + sign but even converting to integer it is
concatenating. Any help would be greatly appreciated.
Dim price1 As Integer
Dim price2 As Integer
Dim price3 As Integer
Dim price4 As Integer
Dim price5 As Integer
Dim TotalPrice As Integer
price1 = CType(txtcost1.Text, Integer)
price2 = CType(txtcost2.Text, Integer)
price3 = CType(txtcost3.Text, Integer)
price4 = CType(txtcost4.Text, Integer)
price5 = CType(txtcost5.Text, Integer)
TotalPrice = price1 + price2 + price3 + price4 +
price5
txtEC.Text = TotalPrice
ShowFields()