title: How to I correctly handle a FollowHyperlink Error in VBA?
body: <p>We're currently transitioning our current product site to a new one, and I need to put in some error handling to say that if the hyperlink returns an error on the new site, to look for it on the old site. The problem I'm having is that I'm currently trying to open up 2 separate pages. The logic would be:</p>
  
  <ol>
  <li>If there's an error looking up [OldSKU] on the new site, follow the
  hyperlink to the old site for the [OldSKU]</li>
  <li>If there's an error looking up [ClosestSKU] on the new site, follow the
  hyperlink to the old site for the [ClosestSKU]</li>
  </ol>
  
  <p>In either case, only 2 tabs would open in the user's browser. With my current VBA, it's actually opening up 3 tabs, and I don't think my logic is sound.</p>
  
  <pre><code>Private Sub ClosestSKU_DblClick(Cancel As Integer)
  
      On Error GoTo Error_Old
      Access.FollowHyperlink "https://www.oursite.com/newstorefront/c/p/" &amp; [OldSKU], , True
  Error_Old:
      Access.FollowHyperlink "https://www.oursite.com/oldstorefront/search/?text=" &amp; [OldSKU], , True
  
      On Error GoTo Error_New
      Access.FollowHyperlink "https://www.oursite.com/newstorefront/c/p/" &amp; [ClosestSKU], , True
  Error_New:
      Access.FollowHyperlink "https://www.oursite.com/oldstorefront/search/?text=" &amp; [ClosestSKU], , True
  
  End Sub
  </code></pre>
  
  <p>Any help/advice you all could provide would be greatly appreciated.</p>
  
  <p>Thanks!</p>