Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to remove values from an Array.
#6
Not Solved
Try this...

Code:
Qtn = ("a;b;c;d")
Arr = Split(Qtn,";")
ItemToBeDeleted = "b"
Brr = ToDeleteEle( Arr , ItemToBeDeleted)


Function ToDeleteEle (Arr , ItemToBeDeleted)
   For i = 0 to UBound(Arr)
       If Arr(i) =  ItemToBeDeleted Then
           While i<UBound(Arr)
               Arr(i) = Arr(i+1)
               i=i+1
           Wend
       End If

   Next
   ReDim Preserve Arr(Ubound(Arr)-1)
  ToDeleteEle = Arr
End Function
Reply


Messages In This Thread
how to remove values from an Array. - by ACCBAJPA - 08-22-2013, 04:27 PM
RE: how to remove values from an Array. - by ssvali - 08-23-2013, 12:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to remove the spaces from a string Anand 7 29,415 08-12-2019, 04:47 PM
Last Post: sreekanthP
  How to remove text in the webedit silpavinod 3 13,767 07-12-2018, 11:08 AM
Last Post: vijaychourasiya0109@gmail.com
  how to remove null values in array venkatesh9032 0 2,887 02-19-2014, 06:51 PM
Last Post: venkatesh9032
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,518 02-10-2014, 03:07 PM
Last Post: pranikgarg
  Adding array to another Global array in VB Script test911 1 3,166 12-02-2012, 12:40 PM
Last Post: parminderdhiman84

Forum Jump:


Users browsing this thread: 1 Guest(s)