G
Guest
I have 26 different panels. I'd like to access their properties dynamcially,
determined by which "spot" is selected. Here's what I've thought of...
Private Function getSpot(ByVal spot As Int16) As Control
Select Case spot
Case 0
Return Me.pnl0
Case 1
Return Me.pnl1
Case 2
Return Me.pnl2
Case 3
Return Me.pnl3
Case 4
Return Me.pnl4
Case 5
Return Me.pnl5
Case 6
Return Me.pnl6
End Select
Return Nothing
End Function
.... as you can see, the panels are named in sequence. is there a better way
to do this? i.e. (me.panel & spot) ...
Thanks!
Casey
determined by which "spot" is selected. Here's what I've thought of...
Private Function getSpot(ByVal spot As Int16) As Control
Select Case spot
Case 0
Return Me.pnl0
Case 1
Return Me.pnl1
Case 2
Return Me.pnl2
Case 3
Return Me.pnl3
Case 4
Return Me.pnl4
Case 5
Return Me.pnl5
Case 6
Return Me.pnl6
End Select
Return Nothing
End Function
.... as you can see, the panels are named in sequence. is there a better way
to do this? i.e. (me.panel & spot) ...
Thanks!
Casey