Sub SortHiddenWS()
Dim Sht As Worksheet
Dim Cel As Range
Dim R As Range
Dim SortSht As Worksheet
Dim X As Long
Dim ShtCnt As Long
Dim Astr As String
Set SortSht = Sheets("SortSht")
SortSht.Range("A:A").ClearContents
Set R = SortSht.Range("A1")
X = -1
For Each Sht In ThisWorkbook.Worksheets
If Sht.Visible = xlSheetHidden Then
X = X + 1
R.Offset(X, 0).Value = Sht.Name
End If
Next Sht
Set R = SortSht.Range(R, R.Offset(10000, 0).End(xlUp))
SortSht.Sort.SortFields.Clear
SortSht.Sort.SortFields.Add2 Key:=R, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With SortSht.Sort
.SetRange R
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ShtCnt = ThisWorkbook.Worksheets.Count
For Each Cel In R
Astr = Cel.Value
Sheets(Astr).Move After:=Sheets(ShtCnt)
Next Cel
End Sub