I am quite sure I am gonna feel real dumb when I found where I am screwing up but I am ALMOST done with a fraction calculator (part of a complete algebraic calculator I am making) and am stuck when trying to reduce my fraction because when I hit the reduce button, it only divides the answer by the first number in my listbox instead of all of the numbers.
So far, I have this code.
Private Sub Reduce(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_reduce.Click
Dim Reduce As Double, i As Double, Result As Double
Do
Reduce = CDbl(lstCommon.Items(i))
Result = txtNum5.Text / Reduce
txtNum6.Text = Result.ToString("#,###.##")
Result = txtDenom5.Text / Reduce
txtDenom6.Text = Result.ToString("#,###.##")
lstCommon.Items.Remove(Reduce)
Loop Until lstCommon.Items.Count = 0
End Sub
Problem I am finding with my code is that it will not put Result in txtNum6.Text or txtDenom6.Text and will not remove Reduce from lstCommon.
Thanks in advance for any help you all can provide.