✔ 最佳答案
Dim i, j As Integer
Dim proNum1, oriNum, newNum, proNum2 As String
oriNum = "1"
newNum = ""
proNum1 = ""
proNum2 = ""
For i = 1 To Val(textbox1.Text)
System.Windows.Forms.Application.DoEvents()
For j = 1 To Len(oriNum)
proNum1 = CStr(Val(Mid(oriNum, Len(oriNum) - j + 1, 1)) * 3 + Val(proNum2))
If Len(proNum1) = 1 Then
proNum2 = ""
ElseIf Len(proNum1) = 2 Then
proNum2 = V.Left(proNum1, 1)
proNum1 = V.Right(proNum1, 1)
End If
newNum = proNum1 & newNum
If (j = Len(oriNum)) And (Len(proNum2) = 1) Then newNum = proNum2 & newNum
Next
oriNum = newNum
newNum = ""
proNum2 = ""
Next