Private Sub Command1_Click()
Dim i As Long
Dim StrLen As Integer
Dim idx As Integer
Dim sStr As String
i = InputBox("输入一个数字")
sStr = CStr(i)
StrLen = Len(sStr)
i = 1
For idx = 1 To StrLen
i = i * Val(Mid(sStr, idx, 1))
Next
Debug.Print "各个数字的乘积是:" & i
End Sub