Number of downloads: 474
I am suppose to calculate in inches the "total" and "average" rainfall for a year.
I know how to add the values of textboxes and average them using txt1.text + txt2.text.
I am not sure how to approach this problem using loops in VB.
If anyone can get met started on how to start with the form above would be great.
This is what i have right now
Public Class RainfallStats Private Sub btmExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btmExit.Click Me.Close() End Sub Private Sub btmClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btmClear.Click txtJanuary.Clear() txtFebruary.Clear() txtMarch.Clear() txtApril.Clear() txtMay.Clear() txtJune.Clear() txtJuly.Clear() txtAugust.Clear() txtSeptember.Clear() txtOctober.Clear() txtNovember.Clear() txtDecember.Clear() lblAverage.Text = "" lblTotal.Text = "" End Sub Private Sub btmCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btmCalculate.Click Dim TotalRain As Integer Dim Avg As Integer End Sub End Class
This post has been edited by xterminal01: 18 September 2010 - 04:15 PM