问答题
【说明】
单击窗体上的“测试”(cmdTest)按钮,出现一个输入框,要求输入一串字符,将该字符串中的非字母字符删除后,显示在窗体中的一个文本框(txtShow)中。
【程序代码】
Private Sub cmdTest_Click( )
Dim strT1 ,strT2 As String
Dim strCh As {{U}}(1) {{/U}}
Dim intL As Integer
Dim intl As Integer
strT1 = {{U}}(2) {{/U}}("请输入一串字符","字符串输入")
intL = {{U}}(3) {{/U}}
strT2 = " "
For intl = I To intL
strCh = Mid ( strT1, intl, 1 )
If(strCh>"A"And{{U}} (4) {{/U}}) Or (strCh >"a" And suCh <"z" )Then
strT2 = strT2 + strCh
End If
Next intl
txtShow. Text= {{U}}(5) {{/U}}
End sub