Change macro to paste as last sheet

C

Chance224

I have a macro that copies the selected sheet and puts it before all of the
other sheets. How can I change it to put the copy after all of the other
sheets (last sheet in the workbook).

ActiveSheet.Copy Before:=Worksheets(1)
 
D

Dave Peterson

I think Don meant something more like:
ActiveSheet.Copy After:=Worksheets(worksheets.count)
or
ActiveSheet.Copy After:=Worksheets(sheets.count)
 
D

Dave Peterson

Change that last one:
ActiveSheet.Copy After:=Worksheets(sheets.count)
to:
ActiveSheet.Copy After:=sheets(sheets.count)
 
Top