VB的Text1.text输入数字,text2.text逆序输出
点option1,text2.text显示逆序输出option12,text2.text显示和...
点option1,text2.text 显示逆序输出
option12,text2.text 显示和 展开
option12,text2.text 显示和 展开
1个回答
展开全部
Private Sub Text1_Change()
If Option1.Value Then
Text2.Text = StrReverse(Text1.Text) '逆序
ElseIf Option2.Value Then
l = Len(Text1.Text)
For i = 1 To l
s = s + Val(Mid(Text1.Text, i, 1)) '求各数之和
Next i
Text2.Text = s
End If
End Sub
Private Sub Option1_Click()
Text1_Change
End Sub
Private Sub Option2_Click()
Text1_Change
End Sub
If Option1.Value Then
Text2.Text = StrReverse(Text1.Text) '逆序
ElseIf Option2.Value Then
l = Len(Text1.Text)
For i = 1 To l
s = s + Val(Mid(Text1.Text, i, 1)) '求各数之和
Next i
Text2.Text = s
End If
End Sub
Private Sub Option1_Click()
Text1_Change
End Sub
Private Sub Option2_Click()
Text1_Change
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询