|
-
Feb 14th, 2003, 12:08 PM
#1
Thread Starter
Lively Member
array of numericUpDowns?
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
if you choose not to decide you still have made a choice!
RUSH rocks!
-
Feb 14th, 2003, 02:17 PM
#2
Sleep mode
Re: array of numericUpDowns?
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}
-
Feb 18th, 2003, 11:10 AM
#3
Thread Starter
Lively Member
arrays cannot be declared with keyword New...?
if you choose not to decide you still have made a choice!
RUSH rocks!
-
Feb 18th, 2003, 11:26 AM
#4
Sleep mode
I don't think so .It's static method .So you don't have to declare it like so .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|