for i=1 to len(text1.text) if asc(mid(text1.text,i,1)>47 and asc(mid(text1.text,i,1)<58 then msgbox "第" & i & "位是数字 " else msgbox "第" & i & "位是其它字符" endif next i 可以通过ascII码判断是数字还是... 然后放在另个temp变量里,赋值你应该会的。。。本回答被提问者采纳
第3个回答 2014-07-06
Private Sub Command1_Click() Dim str1() As Byte Dim a Dim ss As String ReDim str1(Len(Text1.Text)) str1 = Text1.Text For Each a In str1 If a > 47 And a < 58 Then ss = ss & " " & Chr(a) Next Text1.Text = ss End Sub