I have a richtextbox and 3 textboxes:
-the first contains a big number, for ex: 447030482
-the second one contains another number, for ex: 2037
-the third one is for result.
Once the RTB values are summed the result must be equal to the first box value. My code works well when i start the app but if the rtb lines change the value is no longer the same. Here's the code:
Val(indexsum) - sum of the rtb numbersCode:With main Dim indexsum As String = String.Empty For Each iLine As String In .indexes.Lines indexsum = Val(indexsum) + Val(iLine) Next .indexsum.Text = Val(Val(indexsum) + Val(.index1.Text)) - Val(.a10.Text) End With
Val(.index1.Text) - 2037
Val(.a10.Text) - 447030482 (it has to be like this because that value is displayed as the last value of the rtb so i have to remove it)


Reply With Quote