I need to group / sort worksheet tabs alphabetically. The one area which I cannot solve is how to group & sort only tab names which include a specific string. The workbooks will have varying numbers of sheet tabs. I need to move all the sheet tabs where the tab name begins with "INV". This string is suffixed with incremental numbers.
- The sheet tabs which do not contain the text string should be excluded from the sort.
- There may also be hidden sheets, so the code will need to run only on the visible sheets.
This is an example of a possible tab order before sorting:
Tabs Unsorted.bmp
After running the code, it should be sorted as follows:
Tabs Sorted.bmp
The attached workbook contains a code module, but it does not work when sorting only specific tabs and ignoring the others. I plan to include this code in the 'Deactivate' event in the Sheets("Template") module.
Thank you in advance, for your response.
Bookmarks