Name the worksheet in a unique way e.g."aaa" and then write inside the ThisWorkbook
module the following:
Private Sub Workbook_Activate()
If ActiveSheet.Name = "aaa" Then
'Application.CommandBars.ExecuteMso "HideRibbon"
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" 'code to hide ribbon.
Else
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)" 'code to show ribbon.
End If
End Sub
Private Sub Workbook_Deactivate()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)" 'code to show ribbon.
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "aaa" Then
'Application.CommandBars.ExecuteMso "HideRibbon"
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" 'code to hide ribbon.
Else
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)" 'code to show ribbon.
End If
End Sub
which is tested in Excel 2007 and Excel 2010 and works fine.
By the way, having tested Application.CommandBars.ExecuteMso "HideRibbon"
in Excel 2007 and Excel 2010, throws an error, which version do you use?
If you prefer, replace the above 'hide/show lines', with those that work in your version according to the comments.