Hi All

I wrote the function:
Code:
Private Function Filtruj(Index As Integer, KeyAscii As Integer, MyText As TextBox)

MyText(Index).MaxLength = 5
If KeyAscii = 13 Then
SendKeys "{TAB}"
KeyAscii = 0

  ElseIf KeyAscii <> 8 Then
   If InStr(1, MyText(Index), ",") And KeyAscii = 44 Then KeyAscii = 0
   If Not IsNumeric(Chr$(KeyAscii)) And KeyAscii <> 44 Then
      MsgBox "TYLKO liczby - separatorem ułamka jest znak PRZECINKA", vbCritical + vbOKOnly, "UWAGA !"
   KeyAscii = 0
   End If
  End If
  If Mid$(MyText(Index), 1, 1) = "," Then
   MyText(Index).Text = "0" & MyText(Index).Text
   MyText(Index).SelStart = Len(MyText(Index))
  End If
End Function
(hmmm- first question, this function, it's a correctly?)
Now, I want to use it for an all objects of TextBox in my app. So, how I could to do it? Any suggestions.

Thanks in advance

EDIT:
I have this textboxes in the array of controls.