过程调用问题!
我在模块中有一个过程:Public Sub numclick(KeyAscii As Integer, dx As TextBox)是一个只让Textbox只能输入数字的一个过程If KeyAscii = 8 Then Exit Sub
If KeyAscii < Asc("+") Or KeyAscii = Asc(",") Or KeyAscii = Asc("/") Or KeyAscii > Asc("9") Then
KeyAscii = 0
Exit Sub
End If
If Left(dx.Text, 1) = "+" Or Left(dx.Text, 1) = "-" Then
If dx.SelStart = 0 Then
If InStr(dx.SelText, "+") = 0 And InStr(dx.SelText, "-") = 0 Then
KeyAscii = 0
Exit Sub
End If
End If
End If
If KeyAscii = Asc(".") Then
If InStr(dx.Text, ".") > 0 Then
If InStr(dx.SelText, ".") = 0 Then
KeyAscii = 0
End If
End If
Exit Sub
End If
If KeyAscii = Asc("+") Or KeyAscii = Asc("-") Then
If InStr(dx.Text, "+") > 0 Or InStr(dx.Text, "-") > 0 Then
If InStr(dx.SelText, "+") = 0 And InStr(dx.SelText, "-") = 0 Then
KeyAscii = 0
End If
Else
If dx.SelStart > 0 Then
KeyAscii = 0
End If
End If
End If
End Sub
但我想在窗口中的Private Sub Text1_KeyPress(KeyAscii As Integer)调用过程numclick
就是不知道numclick的参数怎么写?