Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sorting and deleting sheets
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sorting and deleting sheets
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting/Sorting | Excel Worksheet Functions | |||
Sorting and Deleting Help | Excel Worksheet Functions | |||
Deleting data by sorting dates | Excel Discussion (Misc queries) | |||
Sorting and deleting empty cells | Excel Discussion (Misc queries) | |||
Deleting Sheets | Excel Programming |