Compute all numbers in Textboxes

Posted by Bugwee under VB.NET category on | Points: 40 | Views : 2118
To add all numbers in a textbox control. Example you have 3 textboxes.
textbox1.text = "12",textbox2.text ="asd",textbox3.text = "2", the result will be Result.text="14"

For Each myControl As Control In Me.Controls
If TypeOf myControl Is TextBox AndAlso IsNumeric(myControl.Text) Then

Dim total As Integer
total += Val(myControl.Text)
Result.Text = Convert.ToString(total)
End If

Comments or Responses

Posted by: Bluedaisy3294 on: 2/14/2012 Level:Starter | Status: [Member] | Points: 10
Thank you for sharing.Barcode scanning is a hot topic these days. And loads of barcode apps are available to use online. Among them, [KEEPAUTOMATION VB NET barCode Reader] is a good one.You may have a try.

Login to post response