VBA - not case sensitive comparison
<p>I tested comparison speed:</p>

<pre><code>Dim counter As Long
</code></pre>

<p>Case sensitive binary comparison (default): 0,016 sec:</p>

<pre><code>For counter = 1 To 100000
    If InStr("This is macro speed test", "macro") &gt; 0 Then
    End If
Next counter
</code></pre>

<p>Case insensitive comparison with case conversion: 0,068 sec:</p>

<pre><code>For counter = 1 To 100000
    If InStr(UCase("This is macro speed test"), "MACRO") &gt; 0 Then
    End If
Next counter
</code></pre>

<p>Case insensitive vbtextCompare: 0,08 sec:</p>

<pre><code>For counter = 1 To 100000
    If InStr(1, "This is macro speed test", "MACRO", vbTextCompare) &gt; 0 Then
    End If
Next counter
</code></pre>

<p>I wonder why text compare did so poorly in this test, I have seen people recommending it on forums over "slow" UCase or LCase conversion.</p>

<p>Are there any faster methods for case insensitive comparison?</p>