vb文本转换
http://zhidao.baidu.com/question/403886641.html?quesup2&oldq=1...
http://zhidao.baidu.com/question/403886641.html?quesup2&oldq=1
展开
1个回答
展开全部
Private Sub Command2_Click()
For i = 1 To Len(Text1.Text)
If Asc(Mid(Text1.Text, i, 1)) = 13 Then
Select Case s
Case "1" To "12": Text2.Text = Text2.Text & 1984 & s & vbCrLf
Case "13" To "24": Text2.Text = Text2.Text & 1974 & s & vbCrLf
s = ""
End Select
Else
s = s & Mid(Text1.Text, i, 1)
End If
Next
End Sub
For i = 1 To Len(Text1.Text)
If Asc(Mid(Text1.Text, i, 1)) = 13 Then
Select Case s
Case "1" To "12": Text2.Text = Text2.Text & 1984 & s & vbCrLf
Case "13" To "24": Text2.Text = Text2.Text & 1974 & s & vbCrLf
s = ""
End Select
Else
s = s & Mid(Text1.Text, i, 1)
End If
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询