Hi All,
I'm trying to copy a Worksheet, rename it and then remove the contents (keep formatting) from a range in the duplicate/new sheet.
I've tried this with the below code, but it removes the contents from the original sheet instead of the new one. What's the best way to do this?
Private Sub btnDuplicate_Click()
Dim myRange As Range
Set myRange = Union(Range("B32:AK55"), Range("AP32:AS55"), Range("B108:AK131"), Range("AP108:AS131"), Range("B184:AK207"), Range("AP184:AS207"))
Application.ScreenUpdating = False
Application.DisplayAlerts = False
ActiveSheet.Copy After:=Sheets(Sheets.Count)
On Error Resume Next
ActiveSheet.Name = Range("E16").Value
ActiveSheet.myRange.Value = ""
On Error GoTo 0
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Many thanks!
Storm
Bookmarks