title: Match the words present in a string. If a words repeats in the sentence them give a message "Match", else give a message "No match"
body: <p>I'm tyring to make program which takes a sentence as input and then splits the different words in it. Now it compares the words and if a word repeats then gives a message match otherwise it gives no match. But on executing the same no <code>MsgBox</code> is displayed.</p>
  
  <p>This is the script that I have written:</p>
  
  <pre><code>Dim sent
  Dim i
  Dim j
  Dim k
  sent = "Its a good day but every day is a good day"
  words = Array(Split(sent))
  For i = LBound(words) To UBound(words)-1
    For j = LBound(words)+1 To UBound(words)
      k = StrComp(words(i), words(j))
      If k=0 Then
        MsgBox ("Match")
      Else
        MsgBox ("No Match")
      End If
    Next
  Next
  </code></pre>