Private Sub Command1_Click()
Dim s As String
Dim i As Long
i = Len(Text1.Text)
If i > 3 Then
Exit Sub
End If
s = String(3 - i, "0") + Text1.Text
MsgBox s
End Sub
Private Sub Command1_Click()
If IsNumeric(Text1) = True Then
If Trim(Text1) = "" Then
MsgBox "000"
Else
MsgBox Format(Text1, "000")
End If
Else
MsgBox "有非数字字符"
End If
End Sub