• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Code to hide/show ribbon

Hi,

Is there any one know the code to hide/show excel ribbon.
I went through internet and i found this code:
-----
Sub ShowHideRibbon1()

If Application.ExecuteExcel4Macro("Get.ToolBar(7,""Ribbon"")") Then
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", False)"
Else
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", True)"
End If

End Sub
---------
It works well, but i don't know why when i close excel file and open again, the hidden ribbon show back. My point is i don't want to show it until i run on the code again.

Thanks,
Chanthan
 
Back
Top