I need to copy paste all my Worksheet name in the current workbook to a new workbook with same worksheet names. (without the datas. I only need the worksheet names.)
I tried following VBA but it shows the error
"The name is already taken." (Runtime Error 1004)
'Create new work book for Pivot
Dim Source As Workbook
Dim Pivot As Workbook
Set Source = ActiveWorkbook
Set Pivot = Workbooks.Add
Dim ws As Worksheet
For Each ws In Worksheets
    'Create new worksheet in new excel
    Dim Line As String
    Line = ActiveSheet.Name
    Pivot.Activate
    Sheets.Add
    ActiveSheet.Name = Line
    Source.Activate
Next
 
     
    