Thread
:
Compare 2 Lists and Take an Action Q
View Single Post
#
28
Posted to microsoft.public.excel.programming
Claus Busch
external usenet poster
Posts: 3,872
Compare 2 Lists and Take an Action Q
Hi Sean,
Am Tue, 22 Nov 2016 05:14:09 -0800 (PST) schrieb
:
I like your idea of code to delete, but I couldn't get it quite to work, some of the template formulas were not in the correct place. Ended up with a 'Template' sheet and copying that in
to delete all contents and insert the contents of "Template" try:
Sub RecNew()
Sheets("Report").UsedRange.ClearContents
Sheets("Template").UsedRange.Copy
Sheets("Report").Range("A1").PasteSpecial xlPasteAll
End Sub
Another way is to delete the sheet "Report" and create it new from
"Template":
Sub RecNew2()
Application.DisplayAlerts = False
Sheets("Report").Delete
Sheets("Template").Copy Befo=Sheets(1)
ActiveSheet.Name = "Report"
Application.DisplayAlerts = True
End Sub
Regards
Claus B.
--
Windows10
Office 2016
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch