Ak by ste to cheli vidieť:
Private Sub Odcitaj(ByVal sender As Object, ByVal e As EventArgs)
Dim mIndex As Integer
mIndex = CType(sender, TextBox).Name
TextBoxy(mIndex).Text = String.Format("{0:# ##0.00}", CSng(TextBoxy(mIndex).Text))
Labely4(mIndex).Text = String.Format("{0:# ##0.00}", (CSng(TextBoxy(mIndex).Text) - CSng(Labely3(mIndex).Text)))
If (CSng(TextBoxy(mIndex).Text) - CSng(Labely3(mIndex).Text) <= 0) Then Labely4(mIndex).ForeColor = Color.Red
TextBox3.Text = String.Format("{0:# ##0.00}", (CSng(TextBox3.Text) + CSng(TextBoxy(mIndex).Text)))
TextBox4.Text = String.Format("{0:# ##0.00}", (TextBox4.Text + Labely4(mIndex).Text))
End Sub
pričom pôvodne, keď mi to nefungovalo, som mal miesto (CSng(TextBoxy(mIndex).Text) - CSng(Labely3(mIndex).Text) toto CSng(Labely4(mIndex).Text ) Dobrú noc!
|