• 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.

How to Disable Tab from Excel 2007

Nitesh Khot

Member
Hi..,

I am looking code to disable Home, Insert , Data tab to be disabled when workbook open..

is there any code to to do this ..

Thanks in advance..
 
Code:
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)"
End Sub

Private Sub Workbook_Open()
ActiveWindow.Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub
 

Attachments

  • test.xlsb
    13.6 KB · Views: 5
Back
Top