Article ID: 105069 - View products that this article applies to.
This article was previously published under Q105069
This article has been archived. It is offered "as is" and will no longer be updated.
Although there is no built-in tool to alphanumerically sort sheets, charts, and Microsoft Excel 4.0 macro sheets in a workbook, you can do this with a macro.
NOTE: In Microsoft Excel 98, you cannot sort modules, because they are displayed in the Visual Basic Editor.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Sample Visual Basic ProcedureThe following macro sorts all of the tabs in the active workbook in ascending order.
NOTE: If you want to sort the tabs in descending order instead of ascending order, change the greater than sign (>) to a less than sign (<) in the following line:
so that it resembles this line:
To use the macro, follow these steps:
Contact us for more help
Connect with Answer Desk for expert help.