title: VBA If Not Intersect not working for larger values on worksheet_change
body: <p>I have the following code:</p>
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
    Dim btn As Button
    Dim t As Range
    Dim i As Integer
    i = Target.Row
    If Not Intersect(Target, Range(&quot;$B10:$B103&quot;)) Then
      If Target.Value &lt;&gt; &quot;&quot; Then
        For Each btn In ActiveSheet.Buttons
          If btn.Name = &quot;I&quot; &amp; i Then
            btn.Delete
          End If
        Next btn
        Set t = ActiveSheet.Range(Cells(i, 9), Cells(i, 9))
        Set btn = ActiveSheet.Buttons.Add(t.Left, t.Top, t.Width, t.Height)
        With btn
          .OnAction = &quot;imageshow&quot;
          .Caption = &quot;View Images&quot;
          .Name = &quot;I&quot; &amp; i
        End With
      Else
        For Each btn In ActiveSheet.Buttons
          If btn.Name = &quot;I&quot; &amp; i Then
            btn.Delete
          End If
        Next btn
      End If
    End If
  End Sub
  </code></pre>
  <p>When I run it, it works if the value entered into B10:B103 is an Integer number, but if I use text or a Long number a combination of text and numbers (data entered in here will be of this form) then it will not work.</p>