when app opens, it works
slide slider all the way to the right, 1things disappears, another appears
when you slide back left, NOTHING appears.
only when you are all the way to the right does the listbox appear
any ideas, thanks
[code]if Slider1.Value = 0 then
Listbox_ATP.Visible = true
Listbox_SAL.Visible = false
end If
if Slider1.Value = 1 then
Listbox_ATP.Visible = false
Listbox_SAL.Visible = true
end If[/code]
ATP goes invisible when I drag slider to 3 or back to 1…weird.
if Slider1.Value = 1 then
Listbox_ATP.Visible = true
Listbox_SAL.Visible = false
else
if Slider1.Value = 2 then
Listbox_ATP.Visible = false
Listbox_SAL.Visible = true
else
if Slider1.Value = 3 then
Listbox_ATP.Visible = true
Listbox_SAL.Visible = false
end If
end if
end
If you wanted to do it using IF’s it would be like this:
[code]'set all visible to false
Listbox_ATP.Visible = False
Listbox_SAL.Visible = False
'… add 18 more here
If slider1.Value = 0 Then
Listbox_SAL.Visible = True
ElseIf slider1.Value = 1 Then
Listbox_ATP.Visible = True
ElseIf slider1.Value = 2 Then
'… add 18 more here
End If[/code]
The way you have it set up, Listbox_SAL only is visible when Slider1 has a value of 1. so unless you’ve restricted the slider to values of 0 and 1, Listbox_SAL won’t show up very often. If what you are trying to do is show Listbox_SAL when the slider’s value is not zero then change