You should find that this method will work in both Excel 2003 and Excel 2007. In your form, add the following method:
Sub CopySheet(WorkSheetName as String) Dim WrkSht As Worksheet Set WrkSht = Sheets(WorkSheetName) WrkSht.Copy After:=Sheets(WorkSheetName) Set WrkSht = Nothing End Sub
From the button click event, call it using:
Sub Button1_Click() Call CopySheet("WorkSheetToCopyName") 'You could also replace the string name with ActiveSheet if you so wish End Sub
This will unload a copy of the worksheet between the current sheet and the next. I tested it in Excel 2003 and Excel 2007, and it works in both. This does not give the second a beautiful name sadly - it just gets the same name as the original sheet with (2) after it.
All formatting, protection, and formulas are also copied - this is a copy of the first.
source share