Private Sub Command1_Click()
Dim strIn As String, I As Integer, T As String, strOut As String
strIn = InputBox("请输入字符串:")
For I = 1 To Len(strIn)
T = Mid(strIn, I, 1)
If T >= "A" And T <= "Z" Then
strOut = T & strOut
End If
Next
MsgBox strOut
End Sub