Ik probeer te checken of een array die al wel gedeclareerd is leeg is.
ik heb al de volgende code gevonden, maar begrijp niet echt wat het nou doet. weet iemand het uit te leggen , of heeft iemand een betere code?
ik heb al de volgende code gevonden, maar begrijp niet echt wat het nou doet. weet iemand het uit te leggen , of heeft iemand een betere code?
code:
1
2
3
4
5
6
| ' Usage, pass "Not arrayname" to the function ' If the array is not redimmed, the compliment of the array pointer is all ones ' If the array is redimmed, the value is the compliment of the pointer Public Function IsArrayEmpty(ByVal lArrayPointer As Long) As Long IsArrayEmpty = (lArrayPointer = -1) End Function |