bom acho q essa dica sua vai me ajudar muito.
Agora apareceu outra ainda, olha só estou gerando as parcelas. Só que eu Coloco a seguinte data de Vencimento 30/10/2007 e gero 7 parcelas
1 - 30/10/2007
2 - 30/11/2007
3 - 30/12/2007
4 - 30/01/2007
5 - 08/02/1930 'FEVEREIRO TEM 28 DIAS ESSE É MEU PROBLEMA
6 - 30/03/2007
7 - 30/04/2007
alguém sabe como resolver isso?
Olha meu código
Dim mes As Integer
Dim ano As Integer
Dim data As String
On Error Resume Next
If txtParcelas.Text = "" Then
MsgBox "O campo PARCELAS esta vazio!", vbInformation
Exit Sub
End If
If txtValor.Text = "" Then
MsgBox "O campo VALOR esta vazio!", vbInformation
Exit Sub
End If
If txtVencimento.Text = "" Then
MsgBox "O campo VENCIMENTO esta vazio!", vbInformation
Exit Sub
End If
If cmbPaga.Text = "" Then
MsgBox "O campo PAGO/A PAGAR esta vazio!", vbInformation
Exit Sub
End If
parc = 1
mes = Format(txtVencimento, "mm")
ano = Format(txtVencimento, "yy")
For i = 1 To txtParcelas.Text
If mes > 12 Then
mes = 1
ano = ano + 1
End If
dia1 = Format(txtVencimento, "dd")
dia = Verifica_dia(dia1, mes)
data = dia & "/" & Format(mes, "00") & "/" & Format(ano, "00")
tbParcelas.AddNew
tbParcelas!Codigo_da_Conta = txtCodigoConta.Text
tbParcelas!Codigo_Cliente = txtCodigo.Text
tbParcelas!Nome_Cliente_Empresa = txtNome.Text
tbParcelas!Vencimento = data
tbParcelas!Data_Pagamento = txtPagamento.Text
tbParcelas!Juros = txtJuros.Text
tbParcelas!MoraMulta = txtMoraMulta.Text
tbParcelas!VALOR = txtValor.Text
tbParcelas!Prestacao_Paga = cmbPaga.Text
tbParcelas!Parcelas = parc
parc = parc + 1
mes = mes + 1
tbParcelas.Update
Next i
Public Function Verifica_dia(dia, mes)
Dim diasDoMes As Variant
dia = Val(dia)
diasDoMes = Array(31, 28, 30, 30, 31, 30, 31, 30, 30, 31, 30, 31)
If dia = 31 Then
Verifica_dia = diasDoMes(mes - 1)
Else
Verifica_dia = dia
End If
End Function