|
-
Jan 27th, 2009, 05:02 PM
#1
Thread Starter
Hyperactive Member
HELP me, a silly question. A little problem with my function
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.
I know, I know, my English is bad, sorry .....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|