KIM Chanthan
Member
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
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