- Home
·
- Miscellaneous
·
- This function will Trim an Array. It removes all empty strings and Null values from an Array and
This function will Trim an Array. It removes all empty strings and Null values from an Array and
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.
Rate This function will Trim an Array. It removes all empty strings and Null values from an Array and
(1(1 Vote))
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
This function will Trim an Array. It removes all empty strings and Null values from an Array and Comments
No comments yet — be the first to post one!
Post a Comment