這是一個可以倒轉文字和切換大小寫的程式,是某網友提供的
做是做到了,不過我不明白,可否給我解釋一下?謝謝
Private Sub Command1_Click()
Dim a As String
Dim b As String
Dim c As String
a = Text1.Text
c = ""
For i = 0 To Len(a)
b = Mid((a), Len(a) - i + 1, 1)
c = c + b
Next i
Text2.Text = c
End Sub
Private Sub Command2_Click()
a = Text1.Text
b = ""
For i = 1 To Len(a)
b = b & IIf(LCase(Mid(a, i, 1)) = Mid(a, i, 1), UCase(Mid(a, i, 1)), LCase(Mid(a, i, 1)))
Next i
Text3.Text = b
End Sub

全站熱搜

vbqa 發表在 痞客邦 留言(1) 人氣()