感謝各位大大~
我PO一下問題~已加入您提供的資訊
Private Sub CommandButton1_Click()
'資料建檔
Y = (Year(TextBoxM))
M = (Month(TextBoxM))
D = (Day(TextBoxM))
N1 = TextBoxN1
N2 = TextBoxN2
N3 = Round(N1 / N2)
For i = (M + 1) To (M + N2)
If i > 12 Then
Sheets("Data").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 5) = Array(DateSerial(Y & "/" & (i - 12) & "/" & D), "分期付款", N3, TextBox1, TextBox2)
Else
Sheets("Data").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 5) = Array(DateSerial(Y & "/" & i & "/" & D), "分期付款", N3, TextBox1, TextBox2)
End If
Next
Unload Me
End Sub