Private Sub CommandButton1_Click()
Dim lin As Long
Dim myDate As Date
Dim parc As String
myDate = txtData.Text
dia = Day(txtData.Text)
Sheets("Plan1").Cells(1, 1) = "Nome"
Sheets("Plan1").Cells(1, 2) = "Parcela"
Sheets("Plan1").Cells(1, 3) = "Valor"
Sheets("Plan1").Cells(1, 4) = "Vencimento"
lin = 2
While Sheets("Plan1").Cells(lin, 1) <> ""
lin = lin + 1
Wend
For i = 0 To cboParcelas.List(cboParcelas.ListIndex) - 1
Sheets("Plan1").Cells(lin, 1) = txtNome.Text
Sheets("Plan1").Cells(lin, 2) = "'" & i + 1 & "/" & cboParcelas.List(cboParcelas.ListIndex)
Sheets("Plan1").Cells(lin, 3) = cboValor.List(cboValor.ListIndex)
If i <> 0 Then
myDate = myDate + 30
End If
While Day(myDate) <> Day(txtData.Text)
myDate = myDate + 1
Wend
Sheets("Plan1").Cells(lin, 4) = myDate
lin = lin + 1
Next i
End Sub
Private Sub UserForm_Initialize()
cboValor.AddItem ("R$ 100,00")
cboValor.AddItem ("R$ 200,00")
cboValor.AddItem ("R$ 300,00")
cboParcelas.AddItem (5)
cboParcelas.AddItem (6)
cboParcelas.AddItem (7)
End Sub