Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ReDim strTempArray(LBound(AryVar) To (UBound(AryVar) - 1))
- ReDim strTempArray(0 To AryVar.Length - 1)
- Public Sub RemoveArrayElement(AryVar(), intIndexToRemove)
- strTempArray()
- lngX = 0 'As Long
- lngDestinationIndex = 0 'As Long
- ReDim strTempArray(LBound(AryVar) To (UBound(AryVar) - 1))
- 'ReDim strTempArray(0 To AryVar.Length - 1)
- lngDestinationIndex = 0
- For lngX = LBound(AryVar) To UBound(AryVar)
- If lngX <> intIndexToRemove Then
- strTempArray(lngDestinationIndex) = AryVar(lngX)
- lngDestinationIndex = lngDestinationIndex + 1
- End If
- Next
- AryVar = strTempArray
- 'End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement