RE: Объявление переменных
Private Function fun()
Dim i As Integer, j As Integer
Dim str As String
Dim Поле0 As TextBox
Set Поле0 = ActiveControl
j = Поле0.SelStart
str = Поле0.Text
For i = 1 To Len(str)
If Mid(str, i, 1) Like "[!0-9,.]" Then
str = Left(str, i - 1) & Mid(str, i + 1)
End If
Next i
If str <> Поле0.Text Then
Поле0 = str
Поле0.SelStart = j - 1
End If
End Function
Private Sub txt_chisla_Change()
fun
End Sub
Private Sub txt_chisla1_Change()
fun
End Sub
|