ItemData should be a number. Having said that (at least 3 times), why repeat things you don't have to?
Code:Public Sub List1_Click() Dim aa As Long Form1.SSTab1.Tab = "1" Form11.Hide Form10.Hide Form12.Hide Form13.Hide Form14.Hide If Form1.List1.ItemData(Form1.List1.ListIndex) <> 0 Then For aa = 0 To Form1.List1.ListCount - 1 Form11.BackGround1(Form11.BackGround1.Count - 1).ZOrder "0" = Form1.List1.ItemData(Form1.List1.ListIndex) Next End If End Sub




Reply With Quote