# 感谢各位！用各位所执导的程式码试验...

Posted by 新手 on July 13, 1999 at 21:12:23:

In Reply to: Re: 问题是如何TextBox只接受大于0之数字？ posted by dino on July 13, 1999 at 20:33:58:

: 不知道该怎么说...
: If KeyAscii <> 8 And (KeyAscii < 48 Or KeyAscii > 57) Then KeyAscii = 0
: 为何不接受KeyAscii=48?

: 可否告知你test的步骤?
Text1.Text中
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And (KeyAscii < 48 Or KeyAscii > 57) Then KeyAscii = 0
End Sub
要的结果是输入完毕后Text1.Text之值不能为0。但以上之程式码无法达到要求结果请问如何更改？

Follow Ups: