Private Sub Command1_Click() Dim i As Integer Dim n As Integer Dim x As String Dim y As Integer, z i

PrivateSubCommand1_Click()DimiAsIntegerDimnAsIntegerDimxAsStringDimyAsInteger,zi=Len(... Private Sub Command1_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = UCase(z)
Else
If y > 64 And y < 91 Then
z = LCase(z)
Exit For
End If
Text1.Text = Text1.Text & z

Next
End Sub

Private Sub Command2_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = z
Else
If y > 64 And y < 96 Then
z = LCase(z)
Exit For
End If

Text1.Text = Text1.Text & z

Next

End Sub

Private Sub Command3_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = 2
Else
If y > 64 And y < 91 Then
z = LCase(z)
Exit For
End If
Text1.Text = Text1.Text & z

Next
End Sub

Private Sub Command4_Click()
Text1.Text = ""
End Sub
展开
 我来答
a483210
推荐于2016-09-07 · 超过23用户采纳过TA的回答
知道答主
回答量:57
采纳率:0%
帮助的人:58.7万
展开全部
修改后的代码
Private Sub Command1_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = UCase(z)
ElseIf y > 64 And y < 91 Then
z = LCase(z)
Exit For
End If
Text1.Text = Text1.Text & z
Next
End Sub
Private Sub Command2_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = z
ElseIf y > 64 And y < 96 Then
z = LCase(z)
Exit For
End If
Text1.Text = Text1.Text & z
Next n
End Sub
Private Sub Command3_Click()
Dim i As Integer
Dim n As Integer
Dim x As String
Dim y As Integer, z
i = Len(Text1.Text)
x = Text1.Text
Text1.Text = ""
For n = 1 To i
z = Mid(x, n, 1)
y = Asc(z)
If y > 96 And y < 123 Then
z = 2
ElseIf y > 64 And y < 91 Then
z = LCase(z)
Exit For
End If
Text1.Text = Text1.Text & z
Next n
End Sub
Private Sub Command4_Click()
Text1.Text = ""
End Sub
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友f619527dc7
2012-06-19 · TA获得超过152个赞
知道小有建树答主
回答量:281
采纳率:100%
帮助的人:199万
展开全部
把z=z上边的if 放到else后边 变成ifelse 就行了。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式