You can put the values ββin Dictionary:
Set list = CreateObject("Scripting.Dictionary")
list.Add 23, True
list.Add 56, True
list.Add 128, True
list.Add 567, True
and then check if your value exists in the dictionary:
If list.Exists(myData) Then
'do stuff
End If
And there ArrayListwill be another option:
Set list = CreateObject("System.Collections.ArrayList")
list.Add 23
list.Add 56
list.Add 128
list.Add 567
If list.Contains(myData) Then
'do stuff
End If
source
share