添加
两个TEXT(multiline=true)
一个按钮
Private Function isChinese(ByVal asciiv) As Boolean a = AscW(asciiv) If Len(Hex$(a)) > 2 Then isChinese = True Else isChinese = False End If End Function Private Sub Command1_Click() text2.text="" '先清空text2 For i = 1 To Len(Text1.Text) DoEvents If isChinese(Mid(Text1.Text,i,1)) = True Then Text2.Text = Text2.Text & "" Else Text2.Text = Text2.Text & Mid(Text1.Text,1) End If Next MsgBox "替换完毕" End Sub
http://d.download.csdn.net/down/1160480/woldy