Sub test()
Dim intNumber As Integer
intNumber = 12545
Dim strAnswer As String '输出字符串
strAnswer = intNumber & "="
Dim intTestNumber As Integer '测试的数
intTestNumber = 2 '初始值设为2
Do
If intNumber Mod intTestNumber = 0 Then
strAnswer = strAnswer & intTestNumber & "*"
intNumber = intNumber / intTestNumber
Else
intTestNumber = intTestNumber + 1
End If
Loop While intNumber <> 1
strAnswer = Mid(strAnswer, 1, Len(strAnswer) - 1) '删除最后的*号
MsgBox strAnswer
End Sub