N
Nathan
If you're wondering why I post so many questions, it's because I want to
make an entry in the Guinness Book of World Records. But because I post so
many, I try to make them simple. Here is (I hope) a simple one:
I've declared a "control array" just after the WFD generated code like this:
Dim LabelArray() as Label = {Label0, Label1, Label2, Label3, Label4, Label5}
But when I try to do something like this:
\\
Private Sub FillLabels
dim a as integer
For a = 0 to 5
Msgbx(LabelArray(a).Text)
Next
End Sub
\\
I get an "Object reference not set to an instance of an object" error. If I
put the Dim statement inside the subroutine, it works fine. Am I doing
something wrong in declaring the array to have class scope?
Once again, thanks for the help.
Nathan
make an entry in the Guinness Book of World Records. But because I post so
many, I try to make them simple. Here is (I hope) a simple one:
I've declared a "control array" just after the WFD generated code like this:
Dim LabelArray() as Label = {Label0, Label1, Label2, Label3, Label4, Label5}
But when I try to do something like this:
\\
Private Sub FillLabels
dim a as integer
For a = 0 to 5
Msgbx(LabelArray(a).Text)
Next
End Sub
\\
I get an "Object reference not set to an instance of an object" error. If I
put the Dim statement inside the subroutine, it works fine. Am I doing
something wrong in declaring the array to have class scope?
Once again, thanks for the help.
Nathan