title: Excel VBA: "invalid procedure call or method" when setting CompareMode to TextCompare with Dictionary
body: <p>For some reason, I cant set the <code>CompareMode</code> in the dictionary <code>offONameDic</code> to <code>TextCompare</code>. I keep getting a <code>"Invalid Procedure or Call Error"</code>. I want to ensure that the capitalization of a, let say, user provided provided key does not affect ability for the Dictionary to recognize the key as valid i.e. if a key was "hello", "Hello" would also be recognized as a key. </p>
  
  <p>Please Note that I use the Microsoft Scripting Runtime Reference from the list of installed libraries in VBA Excel</p>
  
  <p>My Code: </p>
  
  <pre><code>Sub Main()
  '...code...
  Dim offONameDic As Scripting.Dictionary
  '...code...
  Set offONameDic = New Scripting.Dictionary
  With offONameDic
      .Add "Blood", "Blood"
      .Add "Liver", "Liver"
      .Add "Kidneys", "Kidneys"
      .Add "Kidney", "Kidneys"
      .Add "Spleen", "Spleen"
      .Add "Heart", "Heart"
      .Add "Lungs", "Lungs"
      .Add "Lung", "Lungs"
      .Add "Stomach", "Stomach"
      .Add "Muscle", "Muscle"
      .Add "Bone", "Bone"
      .Add "Carcass", "Carcass"
      .Add "Tumor", "Tumor"
      .Add "Axial Lymph Node", "Axial Lymph Node"
      .Add "ALN", "Axial Lymph Node"
      .Add "Igunial Lymph Node", "Igunial Lymph Node"
      .Add "IgLN", "Igunial Lymph Node"
      .Add "Intestines", "Intestines"
      .Add "Intestine", "Intestines"
      .Add "Cecum", "Cecum"
      .Add "Tail", "Tail"
      .CompareMode = TextCompare '****This Line Causes the "Invalid Procedure or Call" Error"****
  End With
  '...code...
  End Sub
  </code></pre>