我已经找到了
Private Sub Form_Load()
Dim num As Long, str As String
num = 12345
str = CStr(num) '将长整型转为字符串
MsgBox Mid(str, 1, 1) 'mid是从字符串里取出字符,第一个参数是从哪个字符串中取,第二个参数是取出的位置,第三个是取出的个数, 例如:(str,1,1) 是 1, (str,2,1) 是 2 ,(str,1,2) 是 12
End Sub
Private Sub Command1_Click()
Dim a As String
a = InputBox("请输入一个三位数")
If Len(a) = 3 Then Text1.Text = "百位是" + Mid(a, 1, 1) + " 十位是" + Mid(a, 2, 1) + " 个位是" + Mid(a, 3, 1)
End If
End Sub