VBA Copy a Worksheet to a New Sheet without Formulas
问题 I am trying to copy whatever selected sheet (notwithstanding the name of the sheet) within the same workbook. First, I have tried the code of copying and renaming a new sheet (with formulas) that I found elsewhere. It is working well: Public Sub CopySheetAndRename() Dim newName As String On Error Resume Next newName = InputBox("Enter the name for the copied worksheet") If newName <> "" Then ActiveSheet.Copy After:=Worksheets(Sheets.Count) On Error Resume Next ActiveSheet.Name = newName End If