vbi-50

Function SInterest(ByVal principle As Currency, ByVal rate As Single, ByVal time As Single) As Double
    SInterest = (principle * rate * time) / 100
End Function

 

Private Sub Command1_Click()
    Dim p, s As Currency, r, t As Single
    p = Val(Text1.Text)
    r = Val(Text2.Text)
    t = Val(Text3.Text)
    s = SInterest(p, r, t)
    Text4.Text = s
End Sub

 

Private Sub Command2_Click()
    End
End Sub

vbo-50

Advertisements