title: Check if sheet exists then delete and add new one with same name
body: <p>I have been trying to write some VBA code to find if sheets with specific name exist, if so, then delete them and create new sheet with that same name. My code looks like this:</p>
  
  <pre><code>Sub DeleteSheet ()
     Dim ws as worksheet
  
     For each ws in worksheets
         if ws.name = "test" then
             Application.DisplayAlerts = False
             ws.delete
             Application.DisplayAlerts = True
         End if
     Next ws
  
     Sheets.add.name = "test"
  End Sub
  </code></pre>
  
  <p>It doesn't seem to work when I run the sub. First the sheet was deleted but it does not create the new one. I have to run it for the second time to be able to get the new sheet.</p>
  
  <p>Please anyone help me on this. I would really appreciate very much.
  Thank you in advance.</p>