You are on page 1of 2

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim capital As Double
Dim plazo As Single
Dim tasa As Single
plazo = Text_plazo.Text
tasa = Text_tasa.Text
capital = Text_capital.Text
text_cuota.Text = (Text_tasa.Text / (1 - (1 + Text_tasa.Text) ^ -Text_plazo.Text) *
Text_capital.Text)
text_cuota.Text = (text_cuota.Text / 100)
RichTextBox1.Text = RichTextBox1.Text & "
" & Text_capital.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim interes As Integer
Dim amortizacion As Double
Dim saldo As Double
Dim periodo(12) As Integer
Dim x As Single
For x = 0 To 11
periodo(x) = Text_capital.Text
'For x = 0 To 9
' dato(x) = (x + 2) * 7
Text_capital.Text = CStr(Text_capital.Text)
interes = CStr((Text_capital.Text * Text_tasa.Text) / 100)
amortizacion = CStr(text_cuota.Text - interes)
saldo = CStr(Text_capital.Text - amortizacion)
RichTextBox1.Text = RichTextBox1.Text & vbNewLine & "............ " & periodo(x) &
".........................." & interes & "............." & amortizacion & "....................................." & saldo
Next
End Sub
End Class

You might also like