title: How do I make an integer to null in Excel VBA?
body: <p>I am trying to detect whether an integer was set, and if not, skip most of the code in the loop (using an if statement). Here is what I have so for.</p>
  
  <pre><code>Do While hws.Cells(r, 9).Value &lt;&gt; ""
      On Error Resume Next
      ar = Null
      ar = aws.Range("A:A").Find(hws.Cells(r, 2).Value).Row
      If Not IsNull(ar) Then
    'work with ar'
      End If
      r = r + 1
  Loop
  </code></pre>
  
  <p>However, when I run it, <code>ar = Null</code> has problems. It says "Invalid use of null".</p>