Copy Without Code

  • Thread starter Thread starter BillCPA
  • Start date Start date
B

BillCPA

Sheet1 in a workbook has code behind it. Is there any way to create a copy
of that worksheet in the workbook and not have the code go with it?
 
Hi,

Put this in a general module and it will copy the active sheet to a new
sheet with (copy) as an extension

Sub MakeCopy()
myname = ActiveSheet.Name
Application.DisplayAlerts = False
Sheets.Add().Name = ActiveSheet.Name & "(Copy)"
Worksheets(myname).UsedRange.Copy _
Destination:=Worksheets(myname & "(Copy)").Cells(1, 1)
Application.DisplayAlerts = True
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top