ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Freeze Sheet Tab (https://www.excelbanter.com/excel-programming/402210-freeze-sheet-tab.html)

Mikey B[_2_]

Freeze Sheet Tab
 
I have my first sheet with a tab called INDEX. It has hyperlinks to jump to
the other sheets on this workbook.
I would like to be able to keep the INDEX tab always on the right and not
scroll off when jumping to different sheets.
This would be similar to freezing panes but rather just freeze one tab.

Sorry if this seems trivial. Any help would be appreciated.



excelent

Freeze Sheet Tab
 
one way :

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveWindow.ScrollWorkbookTabs Sheets:=-Sheets.Count
End Sub

another:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If ActiveSheet.Name < "INDEX" Then
Application.ScreenUpdating = False
x = ActiveSheet.Name
Sheets("INDEX").Move Befo=ActiveSheet
Application.EnableEvents = False
Sheets(x).Select
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub


"Mikey B" skrev:

I have my first sheet with a tab called INDEX. It has hyperlinks to jump to
the other sheets on this workbook.
I would like to be able to keep the INDEX tab always on the right and not
scroll off when jumping to different sheets.
This would be similar to freezing panes but rather just freeze one tab.

Sorry if this seems trivial. Any help would be appreciated.



excelent

Freeze Sheet Tab
 
Forgot put code in ThisWorkbook-module

"Mikey B" skrev:

I have my first sheet with a tab called INDEX. It has hyperlinks to jump to
the other sheets on this workbook.
I would like to be able to keep the INDEX tab always on the right and not
scroll off when jumping to different sheets.
This would be similar to freezing panes but rather just freeze one tab.

Sorry if this seems trivial. Any help would be appreciated.



Mikey B[_2_]

Freeze Sheet Tab
 
Thank you excelent for you response. Both work for what I need just in
different ways.

"excelent" wrote:

one way :

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveWindow.ScrollWorkbookTabs Sheets:=-Sheets.Count
End Sub

another:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If ActiveSheet.Name < "INDEX" Then
Application.ScreenUpdating = False
x = ActiveSheet.Name
Sheets("INDEX").Move Befo=ActiveSheet
Application.EnableEvents = False
Sheets(x).Select
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub


"Mikey B" skrev:

I have my first sheet with a tab called INDEX. It has hyperlinks to jump to
the other sheets on this workbook.
I would like to be able to keep the INDEX tab always on the right and not
scroll off when jumping to different sheets.
This would be similar to freezing panes but rather just freeze one tab.

Sorry if this seems trivial. Any help would be appreciated.




All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com