title: Macro to copy and/or move selected sheets to a new workbook
body: <p>Can someone please help me with a macro? I want to move and/or copy a few selected sheets (hidden &amp; visible) to a new workbook, but since I have a few workbooks open at a time, I want to be able to select worksheets in all open workbooks from like a drop down menu and move and/or copy to a new workbook. I want to move some and copy some worksheets so will need both options in selection box. </p>
  
  <p>Please help as I have cracked my head on it and got nowhere.</p>
  
  <p>I have tried the below:</p>
  
  <pre><code>Sub CopySheet()
      Dim i As Integer, x As Integer
      Dim shtname As String
  
          'i = Application.InputBox("Copy how many times?", "Copy sheet", Type:=1)
          'For x = 0 To i - 1
              ActiveSheet.Copy After:=Sheets(Sheets.Count)
              shtname = InputBox("What's the new sheet name?", "Sheet name?")
              ActiveSheet.Name = shtname
          'Next x
  
  End Sub
  </code></pre>
  
  <p>But this will mean I have to type every sheet name every time.</p>
  
  <p>Adam: While I try to run your code, it gives me an error - <code>variable not specified in row Private Sub btnSubmit_Click()</code></p>
  
  <p>How do I overcome it?</p>
  
  <p>I still can't get it right Adam. I am very new to Macros and I may be doing something wrong with interpreting your instructions. Can you please suggest something like all included in one and run?</p>
  
  <p>Where exactly in the original codes do I need to paste this code</p>
  
  <pre><code>Private Sub btnSubmit_Click()
  
  End Sub
  </code></pre>