excel vba sort sheet numerically
问题 I want to sort sheets in my excel file. I found this code which works. But the problem is that my sheet names are 1_abc, 2_adf, 3_dasf, 11_ad etc. This code puts 11_ad before 2_adf and 3_dasf. I would like to sort sheets based upon number before "_" (first underscore) in my sheet name. How could I do the same? ################################UPDATE1 I modified the code as below. But it is sorting in descending order :(. I want to sort in ascending order Option Explicit Sub SortWorksheets()