After selecting the company name the list of corresponding vehicles Should be displayed in combo box.
Vehicle name: TVS-fiero, victor
: Hero Honda- Ambition,CBZ.
After selecting vehicle name the list of colors available and their rates should be displayed in combo box.
Colors: fiero- black, Red
: victor yellow , blue.
: Ambition black, silver.
: cbz Metallic & black
Price : fiero 50000 Rs.
Victor 45000 Rs.
Ambition 48000 Rs.
CBZ 52000 Rs.
Allow the user to select the bank. After selection the rate of interest should be displayed automatically
Bank: ICICI, HDFC
Rate of interest : ICICI: 9% HDFC: 9.4%
Allow the user to select the duration. Duration of installment 12,18,24 months.
Input down payment Calculate the balance amount , interest amount and EMI (equal months installments)
Dim dp As Integer
Dim emi, amt, roi As Single
Private Sub cboCompany_Click()
cboVehicle. Clear
If cboCompany.Text = "TVS" Then
cboVehicle.Addltem "Fiero" ,0
cboVehicle.Addltem "Vector", 1
Else
cboVehicle.Addltem "Ambition",0
cboVehicle.AddItem "CBZ", 1 End If
End Sub
Private Sub cboVehicle_Click()
cboColor. Clear
If cboVehicle. Text = "Fiero" Then
cboColor.AddItem "Black", 0
cboColor.AddItem "Red", 1
txtPrice.Text = "50000"
Elself cboVehicle.Text = "Victor" Then
cboColor.AddItem "Yellow", 0
cboColor.AddItem "Blue", 1
txtPrice.Text = "45000"
Elself cboVehicle.Text = "Ambition" Then
cboColor .Addltem "Black", 0
cboColor.Addltem "Silver", 1
txtPrice.Text = "48000"
Else: cboVehicle.Text = "Ambition"
cboColor.Addltem "Metallic", 0
cboColor.Addltem "Black", 1
txtPrice.Text = "52000"
End If
cboColor.Text = Clear
End Sub
Private Sub optHDFC_Click()
txtrate.Text = "9.4 %"
End Sub
Private Sub optICICI_Click()
txtrate.Text = "9 %"
End Sub
Private Sub
txtDPay_Validate (Cancel As Boolean)
dp = CInt(txtDPay.Text)
amt = CSng (txtPrice.Text) - dp
txtBalAmt.Text = CStr(amt)
If optICICI. Value = True Then
If opt12.Value = True Then
emi = ((amt * 9) / 100 + amt) / 12
Elself opt18.Value = True Then
emi = ((amt * 9) / 100 + (amt * 9) /100 / 2 + amt) / 18
Elself opt24.Value = True Then
emi = ((amt * 9) / 100 + (amt * 9) / 1000 * 2 + amt) / 24
End If
txtEMI. Text = emi
End If
If optHDFC.Value = True Then
If opt12.Value = True Then
emi = ((amt * 9.4) / 100 + amt) / 12
ElseIf opt18.Value = True Then
emi = ((amt * 9.4) / 100 + (amt * 9.4) / 100 / 2 + amt) 18
ElseIf opt24.Value = True Then
emi = ((amt * 9.4) / 100 + (amt * 9.4) / 1000 * 2 + amt) / 24
End If
txtEMI.Text = emi
End If
End Sub
No comments:
Post a Comment