title: Excel VBA error handling not working for second error
body: <p>In the below code <code>Errorhandler</code> correctly takes care of first error when I enter a workbook that is not open or any random string. But when I click on retry and again enter a random name I get "<code>Subscript out of Range</code>" error @ Workbooks(workbookname). Activate.</p>
  
  <p>Can anyone help me why it is happening and how can I make it work.  I have tried a lot of things. But nothing is working. This code is part of a larger program.</p>
  
  <pre><code>Sub test()
  
  Dim workbkname As String
  On Error GoTo Errorhandler
  Retry:
  
  workbookname = InputBox("Enter workbook name:", _
                          "Name Enrty")
  If StrPtr(workbookname) = 0 Then
      MsgBox ("Aborting Program")
      End
  End If
  
  Workbooks(workbookname).Activate
  Exit Sub
  
  Errorhandler:
  Response = MsgBox("Workbook " &amp; workbookname &amp; " not found", vbRetryCancel)
  If Response = 4 Then
      GoTo Retry
  
  End If
  
  End Sub
  </code></pre>