simple/compound interest calculator
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: simple/compound interest calculator

  1. #1
    Join Date
    May 2010
    Posts
    3

    Unhappy simple/compound interest calculator

    we also had to create a simple and a compound calculator all in one and this is proving to be trouble some for me so can some one help

    Dim p As Double
    Dim i As Double
    Dim l As Double
    Dim m As Double
    Dim j As Double
    Dim simp As Double
    Dim comp As Double

    Private Sub optMonths_Click()
    i = txt2.Text
    p = txt1.Text
    l = txt3.Text
    comp = (p(1 + i) / l)
    simp = (p * i * l)
    End Sub

    Private Sub optYears_Click()
    i = txt2.Text
    p = txt1.Text
    l = txt3.Text
    comp = (p(1 + i) ^ l)
    simp = (p * i * l)
    End Sub


    Private Sub cmdClear_Click()
    txt1 = ""
    txt2 = ""
    txt3 = ""
    txt4 = ""
    txt5 = ""
    txt6 = ""
    txt7 = ""
    txt1.Enabled = True
    txt1.SetFocus
    End Sub


    Private Sub cmdExit_Click()
    End
    End Sub

    Private Sub Label1_Click()
    End Sub

    Private Sub cmdReturn_Click()
    Unload Me
    Money.Hide
    menu.Show
    End Sub


    Private Sub txt1_KeyPress(KeyAscii As Integer)
    txt1.SetFocus
    If KeyAscii = 46 Then
    KeyAscii = 46
    ElseIf KeyAscii > 57 Or KeyAscii < 48 Then
    KeyAscii = 0
    End If
    End Sub

    Private Sub txt2_KeyPress(KeyAscii As Integer)
    txt2.SetFocus
    If KeyAscii = 46 Then
    KeyAscii = 46
    ElseIf KeyAscii > 57 Or KeyAscii < 48 Then
    KeyAscii = 0
    End If
    End Sub

    Private Sub txt3_KeyPress(KeyAscii As Integer)
    txt3.SetFocus
    If KeyAscii = 46 Then
    KeyAscii = 46
    ElseIf KeyAscii > 57 Or KeyAscii < 48 Then
    KeyAscii = 0
    End If
    End Sub

    Private Sub txt6_KeyPress(KeyAscii As Integer)
    txt6.SetFocus
    If KeyAscii = 46 Then
    KeyAscii = 46
    ElseIf KeyAscii > 57 Or KeyAscii < 48 Then
    KeyAscii = 0
    End If
    End Sub

    Private Sub txtFutval_KeyPress(KeyAscii As Integer)
    txtFutval.SetFocus
    If KeyAscii = 46 Then
    KeyAscii = 46
    ElseIf KeyAscii > 57 Or KeyAscii < 48 Then
    KeyAscii = 0
    End If
    End Sub

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: simple/compound interest calculator

    You will find the Answer here
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center