Hi Guys,
Im basically mirroring www.wonga.com loan application
So far so good, but when it comes to generate the values for the interest and fees and place them in a textbox it adds an additional 0 to the amount? the total amount textbox is correct, im tried everything i can think of my code is below.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TrackBar1.SetRange(0, 400)
Me.TrackBar2.SetRange(0, 46)
End Sub
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll, TrackBar2.Scroll
Me.TextBox1.Text = TrackBar1.Value
Me.TextBox2.Text = TrackBar2.Value
Me.TextBox3.Text = Me.TextBox1.Text
Dim Dat As System.DateTime = Date.Now
Dim Fee As Double = 5.56
Me.TextBox4.Text = Fee
Dim Percent As Double = 360
Dim Borrow As Double = Me.TrackBar1.Value
Dim CostPerAllDays As Double = ((Borrow * Percent / 100) / 360) * Me.TrackBar2.Value
Me.TextBox4.Text = Format(CostPerAllDays, "£ 00.0") & Me.TrackBar2.Value
Dim TotalCosts As Double = CostPerAllDays + Borrow + Fee
Me.TextBox5.Text = Format(TotalCosts, "£ 00.00")
Me.Label7.Text = Dat.AddDays(TrackBar2.Value).ToString("ddd MMM d yyyy")
End Sub
End Class
If I was to maximize the 1st trackbar to 400 and then maximize the 2nd track bar to 45
the borrow amount would be £400 the interest and fees would be £ 184.046 and the total amount would be £ 589.56
As you can see the total amount doesnt add up correctly, and also there is another 0 in the interest and Fees....
Can some one shed any light on this, as i have been going around and around trying formats, changing bits just to be stuck in the same issue....
Thanks in advance