I want to create a copy of a sheet with data. I managed to create a copy with this code, but want to create it with a defined name
Dim outsheet As String outsheet = "SAP Import" Dim wsCopy As Worksheet Set wsCopy = ThisWorkbook.Worksheets(outsheet) wsCopy.Copy After:=ThisWorkbook.Worksheets(outsheet) Now I would like to change the name. The obvious solution is however not implemented in VBA (Parameter unknown)
Dim strSheetTemp As String strSheetTemp = outsheet + "-temp" wsCopy.Copy Destination:=ThisWorkbook.Worksheets(strSheetTemp) How can I create a named copy? Or how can I get the name of the copy to rename it ?