Dears,
Can anybody help me to hide ribbon, headings, gridlines, ruler only for one specific sheet.
I have found the below code, but this is applying for all the sheet on workbook.
Private Sub Workbook_Open()
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = False
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
For Each wsSheet In wbBook.Worksheets
If Not wsSheet.Name = "Blank" Then wsSheet.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingRows:=True
'ActiveSheet.EnableSelection = xlUnlockedCells
End With
Next wsSheet
myRange.Select
End Sub
▬▬▬▬▬▬▬▬▬ Mod edit : thread closed as duplicate
Can anybody help me to hide ribbon, headings, gridlines, ruler only for one specific sheet.
I have found the below code, but this is applying for all the sheet on workbook.
Private Sub Workbook_Open()
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = False
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
For Each wsSheet In wbBook.Worksheets
If Not wsSheet.Name = "Blank" Then wsSheet.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingRows:=True
'ActiveSheet.EnableSelection = xlUnlockedCells
End With
Next wsSheet
myRange.Select
End Sub
▬▬▬▬▬▬▬▬▬ Mod edit : thread closed as duplicate
of one on the appropriate VBA forum !