怎样删除字符 当在文本框中输入时,怎样去掉字符而保留数字?非常感谢!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 13 Then KeyAscii = 0 End If Private Sub Text1_KeyPress(KeyAscii As Integer) If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 13 Then KeyAscii = 0 End IfEnd Sub Private Sub Command1_Click() Dim s, s1 As String Dim i As Long s = Trim(Text1.Text) For i = 1 To Len(s) If Asc(Mid(s, i, 1)) >= 48 And Asc(Mid(s, i, 1)) <= 57 Then s1 = s1 & Mid(s, i, 1) End If Next i Text1.Text = s1End Sub VB DLL 的版本问题 VB能不能做一个有入口点的DLL函数 电子称读书取值,高手们帮忙 combo控件的问题 怎么来判断打印Excel翻页? 为什么会溢出?怎么解决?谢谢 VSFlexGrid控件的排序问题 怎样在程序中获得excell.exe的全路径? asp中如何点击1下拉框(或文本框),弹出ActiveX控件MonthView,选择日期后日期显示在下拉框(或文本框)中? 这个语句怎么写 for i= 5 to 1 ??? 错误提示:参数类型不正确,或不在接受的范围内,或冲突! 急急急急急急,一个VB的简单问题,请各位大侠帮忙
KeyAscii = 0
End If
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 13 Then
KeyAscii = 0
End If
End Sub
Dim s, s1 As String
Dim i As Long
s = Trim(Text1.Text)
For i = 1 To Len(s)
If Asc(Mid(s, i, 1)) >= 48 And Asc(Mid(s, i, 1)) <= 57 Then
s1 = s1 & Mid(s, i, 1)
End If
Next i
Text1.Text = s1
End Sub