View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Spike Spike is offline
external usenet poster
 
Posts: 140
Default sorting and deleting sheets

excellent many thanks
--
with kind regards

Spike


"Tom Ogilvy" wrote:

You probably should delete the sheets first, then sort the rest - or vice
versa - depending on the functionality you want. To delete sheets from the
right side of the tab order:

for i = worksheets.count to 5 step -1
Application.displayAlerts = False
Worksheets(i).Delete
Application.DisplayAlerts = True
Next

to sort sheets in the tab order you can use code like this at Chip Pearson's
site:
http://www.cpearson.com/excel/sortws.htm

--
Regards,
Tom Ogilvy


"Spike" wrote:

i will be grateful for a piece of code to sort all the sheets in a workbook,
say to the left of a certain sheet, and also a piece of code to delete all
the worksheets say to the right of a certain sheet.

I am sure this must have been asked before but i cannot find it in the forum
--
with kind regards

Spike