Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,25 @@
' declared in a module
Public Function LengthOfArray(ByRef arr As Variant) As Long
If IsArray(arr) Then
LengthOfArray = UBound(arr) - LBound(arr) + 1
Else
LengthOfArray = -1
End If
End Function
' somewhere in the programm
' example 1
Dim arr As Variant
arr = Array("apple", "orange")
Debug.Print LengthOfArray(arr) ' prints 2 as result
' example 2
Dim arr As Variant
ReDim arr(-2 To -1)
arr(-2) = "apple"
arr(-1) = "orange"
Debug.Print LengthOfArray(arr) ' prints 2 as result