by Joshua Carroll (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 25th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This function will "Trim" an Array. It removes all empty strings and Null values from an Array and returns.
API Declarations
'its just nice to know if it was helpful to someone else.
Dim tempArray As Variant, tempArrayCount As Integer
tempArray = Array(tempArray)
tempArrayCount = -1
For x = 0 To UBound(varArray)
If varArray(x) <> "" Then
tempArrayCount = tempArrayCount + 1
End If
Next x
ReDim tempArray(tempArrayCount)
tempArrayCount = 0
For x = 0 To UBound(varArray)
If varArray(x) <> "" And Not varArray(x) = vbNull Then
tempArray(tempArrayCount) = varArray(x)
tempArrayCount = tempArrayCount + 1
End If
Next x
varArray = tempArray
End Function
No comments have been posted about This function will Trim an Array. It removes all empty strings and Null values from an Array and . Why not be the first to post a comment about This function will Trim an Array. It removes all empty strings and Null values from an Array and .