Hello
I have a workbook with more than 100 worksheets and the number is growing as I add a new worksheet for every new client. I have 3 worksheets (viz. "Summary" , "Original Template" and "Reports") that I need to access all the time and I am wondering if there is a way these 3 worksheets are always shown as first 3 tabs (from Left) on the tabs ribbon. I have a code in place to alphabetically arrange the worksheet tabs, but I want these three worksheet tabs to be excluded from the alphabetical order.
Below is the code I am using to alphabetically organise the tabs:
Could anyone please help me with this ?
Thanks
V
I have a workbook with more than 100 worksheets and the number is growing as I add a new worksheet for every new client. I have 3 worksheets (viz. "Summary" , "Original Template" and "Reports") that I need to access all the time and I am wondering if there is a way these 3 worksheets are always shown as first 3 tabs (from Left) on the tabs ribbon. I have a code in place to alphabetically arrange the worksheet tabs, but I want these three worksheet tabs to be excluded from the alphabetical order.
Below is the code I am using to alphabetically organise the tabs:
VBA Code:
Sub SortWorksheetsTabs()
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
.DisplayStatusBar = False
.EnableEvents = False
End With
Dim ShCount As Integer, i As Integer, j As Integer
ShCount = Sheets.Count
For i = 1 To ShCount - 1
For j = i + 1 To ShCount
If UCase(Sheets(j).Name) < UCase(Sheets(i).Name) Then
Sheets(j).Move Before:=Sheets(i)
End If
Next j
Next i
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.DisplayStatusBar = True
.EnableEvents = True
End With
End Sub
Could anyone please help me with this ?
Thanks
V