title: proper error handling for resetting Hourglass
body: <p>I have a project with a number of instances of</p>
  <pre><code>    DoCmd.Hourglass -1
          &lt;various code&gt;
      DoCmd.Hourglass 0
      &lt;other code&gt;
  </code></pre>
  <p>Any time there is an error, the line turning off the hourglass gets skipped. The users get confused and wait for the app to be ready again.</p>
  <p>Normally, I'd handle this in a try..finally</p>
  <pre><code> try {
      DoCmd.Hourglass -1
          &lt;various code&gt;
   } finally {
      DoCmd.Hourglass 0
   }
  </code></pre>
  <p>but that isn't an option in VBA.<br />
  I thought it would be a simple matter to search and find the correct approach, but <em>every</em> sample I found takes the naïve approach above.</p>
  <p>The trick is that I don't want to affect any of the existing program flow, which means that I need to rethrow the error.<br />
  And, of course, &quot;throw&quot; doesn't exist either.<br />
  But it also means that I do NOT need to resume where the error happened.</p>
  <p>Here's my current best guess</p>
  <pre><code>On Error GoTo ErrHandler
      DoCmd.Hourglass -1
          &lt;various code&gt;
      DoCmd.Hourglass 0
      &lt;other code&gt;
  Exit Function
  ErrHandler:
      DoCmd.Hourglass 0
      Err.Raise Err.Number
  End Function        
  </code></pre>
  <p>but I have 0 confidence that this is the best solution.</p>