Hello,
I am new to VB programming. I have the following code. When I execute my program only the last value from the loop is displayed in the label. I do write my code so that all of the values (years 1 to 5) show up in the label?
Any help would be greatly appreciated!
For y = 1 To 5
dblFV1 = FV(dblRate / 12, y * 12, -dblMthAmtDbl)
lblResult.Text = ("Future value at end of ..." & vbCrLf & "Year " & y & ": " & FormatCurrency(dblFV1, 2))
Next y
I am new to VB programming. I have the following code. When I execute my program only the last value from the loop is displayed in the label. I do write my code so that all of the values (years 1 to 5) show up in the label?
Any help would be greatly appreciated!
For y = 1 To 5
dblFV1 = FV(dblRate / 12, y * 12, -dblMthAmtDbl)
lblResult.Text = ("Future value at end of ..." & vbCrLf & "Year " & y & ": " & FormatCurrency(dblFV1, 2))
Next y