In a line of code I put a value in List1.ItemData like this:
List1.AddItem RoomName
List1.ItemData(List1.NewIndex) = Index
Ok, ItemData contains the value 2 at this time
This is the only code line that puts a value in ItemData. It is not executed again
Later in another function I use this information like this:
s2 = List1.List(n) ' equals the name of the room I put in it above
n1 = List1.ItemData(n) ' equals 0 but it should equal 2
List1.AddItem RoomName
List1.ItemData(List1.NewIndex) = Index
Ok, ItemData contains the value 2 at this time
This is the only code line that puts a value in ItemData. It is not executed again
Later in another function I use this information like this:
s2 = List1.List(n) ' equals the name of the room I put in it above
n1 = List1.ItemData(n) ' equals 0 but it should equal 2