Hi all,

I'm trying to speed up a macro which deletes a pivottable on a sheet using
cells.delete
This takes an age and when there are a lot of sheets it would be a good to place to focus on to speed up the overall macro.

What I thought about doing was deleting the sheet - I think this is a lot quicker but I have the problem that when I add a sheet back in I can change the name but not the code name.

Does anyone have any ideas of how to do this?

Code so far:
[CODE]
ActiveSheet.Delete
Sheets.Add
ActiveSheet.Name = "BI Projects"
ActiveSheet.Move Before:=Sheets(10)
/CODE]

I just need the "Sheet17" for example to be "Sheet2"