Hi im new to this so please bere with me.

Im trying to get a trackbar to work so that when it slides if enables the visible setting of some list boxes and lables etc.

When trackbar = 5, listboxes 1-5 are displayed, lables 1-5 are displayed and buttons 1-5 are displayed but 6-8 are all hidden.
Similally when trackbar = 2, listboxes 1 and 2 are displayed, lables 1 and 2 are displayed and buttons 1 and 2 are displayed but 3-8 are all hidden.

Ive got it to work but only after 200 odd lines of code with loads of if statements and to be honest im sure it can be done in a better way.

If anyone can help I would really appreciate it.

Bellow is some of what I have currently got.

If trackbarvalue = 8 Then
lstIsle8.Visible = True
lblShelf8.Visible = True
btnAddShelf8.Visible = True
btnAddList8.Visible = True
lstIsle7.Visible = True
lblShelf7.Visible = True
btnAddShelf7.Visible = True
btnAddList7.Visible = True

etc etc.

Thanks very much in anticipation