Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. ReDim strTempArray(LBound(AryVar) To (UBound(AryVar) - 1))
  2.  
  3. ReDim strTempArray(0 To AryVar.Length - 1)
  4.  
  5. Public Sub RemoveArrayElement(AryVar(), intIndexToRemove)
  6. strTempArray()
  7. lngX = 0 'As Long
  8. lngDestinationIndex = 0 'As Long
  9.  
  10. ReDim strTempArray(LBound(AryVar) To (UBound(AryVar) - 1))
  11. 'ReDim strTempArray(0 To AryVar.Length - 1)
  12. lngDestinationIndex = 0
  13.  
  14. For lngX = LBound(AryVar) To UBound(AryVar)
  15. If lngX <> intIndexToRemove Then
  16. strTempArray(lngDestinationIndex) = AryVar(lngX)
  17. lngDestinationIndex = lngDestinationIndex + 1
  18. End If
  19. Next
  20.  
  21. AryVar = strTempArray
  22. 'End If
  23. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement