title: How to remove duplicate from an array using vb script without using dictionary objects?
body: <p>I am trying to remove duplicates from array using for loop and conditional statement.But I am unable to create new array without any duplicates.There is xls having country name with duplicates,i am aiming to remove duplicates and create a new array with unique country names.
  For e.g</p>
  
  <pre><code>strFilePath="D:\Country.xls"
  Set objExcel = CreateObject("Excel.Application")
  objExcel.Visible=True
  Set objWorkbook = objExcel.Workbooks.Open (strFilePath)
  Set objSheet=objExcel.Sheets("Country")
  
  objExcel.DisplayAlerts = False
      objExcel.AskToUpdateLinks = False
      objExcel.AlertBeforeOverwriting = False
  Dim A(100)
      Dim B(100)
      For i = 2 To 6 Step 1
               k = i-2
      A(k)=objSheet.Cells(i,1).Value
  
  Next
      B(0)=A(0)
      For j = 0 To 4  Step 1
           strIt=A(j)
  
  For m = 1 To 4 Step 1
          reslt = StrComp(A(m),strIt,1)
               If(reslt = 1 Or reslt = -1) Then
                      c=1
                      B(c)=A(m)
                      c=c+1
                      End if
                  m=m+1
              Next
      Next
  </code></pre>