title: VBA - variable worksheet name user defined
body: <p>Wondering if anyone can help as I've tried several times to create this functionality within excel.</p>
  
  <p><strong>Summary</strong> - The end user will place the applicable rear in a particular cell within designated cell on worksheet and push a macro button to copy last years holiday tracker and create a new worksheet, subsequently renaming the copied worksheet.</p>
  
  <p><strong>Problem</strong> - when trying to declare the applicable worksheet variable worksheet name in question I get a type mismatch error.</p>
  
  <p>Appreciate if someone can help?</p>
  
  <p>The below code is stumbling block when declaring the sheet in question.</p>
  
  <pre><code>Sub test()
  
  Dim ws as worksheet
  Dim wsn as string
  
  wsn = sheets("procedures").range("a1").value
  Set ws = wsn
  
  ws.activate
  
  End sub
  </code></pre>