When I try to copy sheet manually to new workbook, Excel do nothing
When I try to copy sheet manually to end of workbook, Excel makes empty new sheet.
When I try to copy sheet with VBA:
Sub TransEx()
Dim TemplatesFolder As String, FileName As String
TemplatesFolder = Replace(ThisWorkbook.FullName, ThisWorkbook.Name, "")
FileName = TemplatesFolder & "Transactions" & ".xlsx"
If Len(Dir(FileName)) <> 0 Then Kill FileName
ThisWorkbook.Worksheets("Baza").Copy
Application.ActiveWorkbook.SaveAs FileName, FileFormat:=51
End Sub
I got error on ThisWorkbook.Worksheets("Baza").Copy
Run-time error '1004': copy method of worksheet class failed
How to Fix that?