I have coding i am store data as dictionary
dim dic as new scripting.dictionary
Sub mydic()
For each x in array("a","b" "c")
dic.add x,nothing
Next x
End sub
When dictionary using in sub makro
This bellow is error
sub aa()
Dim r as range
For each r in [A1:A10]
If dic.exists(r.value)
Then
Msgbox "data valid"
End if
Next r
End sub
But if using call mydic ,that will be sucses
sub aa()
Call mydic 'must calling how to do dictionary can redefine r has exists or not without call
Dim r as range
For each r in [A1:A10]
If dic.exists(r.value)
Then
Msgbox "data valid"
End if
Next r
End sub
Bookmarks