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