'thanks
'Declaration of variables and arrays as public
Public AmountclubYear(4, 0) As Decimal
Public club(4) As Integer
Public Year() As Integer
Public InputStartingYear As Integer
Public InputFinalYear As Integer
Public x As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'store the name of each club
club(0) = "r54000"
club(1) = "r54001"
club(2) = "r54002"
club(3) = "r54003"
club(4) = "r54004"
'user enters start and final year,
InputStartingYear = InputBox("Please enter the starting year.")
InputFinalYear = InputBox("Please enter the final year.")
'Program to calculate the number of years
x = InputStartingYear - InputFinalYear
'redim
ReDim Year(x)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'the user will be prompted by input boxes for cost
For club = 0 To 4
For Year = 0 To x
AmountclubYear(club, Year) = _
CDec(InputBox("Enter the cost incurred for club ",
club, " and year ", Year))
Next Year
Next club
End Sub
End Class