Speed Up A Macro / Delete Worksheets
Any suggestions on speeding up this macro? Also, I'm working on a
macro to be able to delete these revision worksheets once I get the
information I need. However, when I use the "For i To..." it is
skipping every other worksheet (for obvious reasons). Any suggestions
on that?
Sub CopySortRev()
'
Application.ScreenUpdating = False
For i = 1 To 8
Worksheets(i).Copy After:=Worksheets(i + 8)
Sheets(i + 9).Name = Sheets(i).Name & " Rev"
Range("A2:E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next i
Application.ScreenUpdating = True
End Sub
Sub DeleteRev()
For i = 10 To 17
Sheets(i).Select
ActiveWindow.SelectedSheets.Delete
Sheets(i).Delete
Next i
End Sub
|