Hi I'm using this to create/duplicate a new worksheet, is there a way I can protect the formulas which get deleted currently?
There are formulas in F4, J4, N4, R4, V4, Z4, AD4
Thanks
Sub Button1_Click()
ActiveSheet.Copy after:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = GetName
Range("D4:AE29").Select
Selection.ClearContents
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("D4:E4").Select
End Sub
There are formulas in F4, J4, N4, R4, V4, Z4, AD4
Thanks
Sub Button1_Click()
ActiveSheet.Copy after:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = GetName
Range("D4:AE29").Select
Selection.ClearContents
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("D4:E4").Select
End Sub