Re: array of numericUpDowns?
Quote:
Originally posted by joeframbach
i keep getting this error that says object reference not set to an instance of an object. why?
Dim NUDs() As NumericUpDown = {nudHam, nudNuts, _
nudFruit, nudSpread, nudCandy, nudCookie, nudAnimal}
Sub setMax(ByVal i As Integer)
Dim size As Integer
If radSmall.Checked Then size = 80 Else size = 160
NUDs(i).Maximum = Weights(i) \ size
End Sub
Did you try this ??
VB Code:
Dim NUDs() As New NumericUpDown = {nudHam, nudNuts, _
nudFruit, nudSpread, nudCandy, nudCookie, nudAnimal}