一个判断字符的问题
假如文本框里的字符为 a_12 则取12显示出来
假如文本框的字符为 d_r_o_345 则取345 也就是说得到最后一个_ 右边的数字
[解决办法]
Private Sub Command1_Click()
Dim s As String
s = "d_r_o_345 "
Dim arrtemp() As String
arrtemp = Split(s, "_ ")
MsgBox arrtemp(UBound(arrtemp))
End Sub
Private Sub Command2_Click()
Dim s As String
s = "d_r_o_345 "
MsgBox Mid(s, InStrRev(s, "_ ") + 1, Len(s))
End Sub