Private Sub Form_Load()
Show
aa:
shuzi = InputBox("请输入五位数")
If Len(shuzi) = 5 Then
Dim a(4),maxnum
maxnum = 0
For i = 0 To 4
a(i) = Mid(shuzi,i + 1,1)
If maxnum < a(i) Then maxnum = a(i)
Next
Print shuzi & "的最大数字是:" & maxnum
Else
MsgBox "输入错误,请输入五位数"
GoTo aa
End If
End Su