麻烦大佬看看哪一步出错了(个人觉得是在st那儿),导致最后不
vb吧
全部回复
仅看楼主
level 3
killer2pig 楼主
麻烦大佬看看哪一步出错了(个人觉得是在st那儿),导致最后不管测试都是一个结果,例如都显示是小写字母或者是数字。[笑眼][笑眼]
Private Sub Command1_Click()
Dim s As String, st As String * 1, i As Integer, n As Integer
s = Text1.Text
i = Text2.Text
n = Len(s)
If i > n Then
MsgBox "指定位置出错,请重新输入!"
Text2 = ""
Else
st = Text1.Text
Select Case st
Case "A" To "Z"
Text3.Text = "是大写字母"
Case "a" To "z"
Text3.Text = "是小写字母"
Case "0" To "9"
Text3.Text = "是数字字符"
Case Else
Text3.Text = "是其他字符"
End Select
End If
End Sub
2020年05月07日 00点05分 1
level 3
killer2pig 楼主
顶一下[呵呵]
2020年05月07日 00点05分 2
level 3
killer2pig 楼主
顶一下
2020年05月07日 00点05分 3
level 11
①i=val(text2)
②st=mid(text1,i,1)
2020年05月07日 01点05分 4
感谢大佬!!!太强了[大拇指][大拇指]
2020年05月07日 08点05分
1