How do I hide developer tab

Viewed 557

Thanks in Advance!

I have designed a spreadsheet for tracking employee attendance,instead of paying for a subscription. It is designed with different password levels depending on how much access you are allowed. EX supervisors can enter daily attendance recorders but cannot submit changes or add/delete employees. Besides having sheet protection for which cells can be selected/info entered, I have also a workbook protection for denying access to functions, such as make sheets hidden/visible and add rows/columns. What I still need this code to do is make the developer tab not visible. I have seen plenty of suggestions saying to use XML for ribbon customization.

I do not want to use XML because:

  1. I have yet to see how to incorporate it into VBA

  2. It is a separate file

  3. lack of familiarity

  4. I am using Excel 2007 which is no longer supported by MS, thus finding information very difficult (maybe I'll update some day)

Here is my workbook protection code.

Sub Workbook_Lock()

Dim set_work_book_password As String
Dim work_book_password As String

set_work_book_password = "Password"

top:
work_book_password = InputBox("Enter Password to Protect Workbook", "Workbook Lock Password", "password")

If work_book_password = "" Then
    MsgBox "Protection Canceled"
    Exit Sub
End If

work_book_password_re_entered = InputBox("Verify Password", "Workbook Lock Password", "password")

If work_book_password_re_entered = "" Then
    MsgBox "Protection Canceled"
    Exit Sub
End If

If Not (work_book_password = work_book_password_re_entered) Then
    MsgBox "Passwords do not match" & vbNewLine & "Retry"
    GoTo top
End If

If Not (set_work_book_password = work_book_password) Then
    MsgBox "Incorrect Predefined Password" & vbNewLine & "Please use Predefined Password"
    GoTo top
End If

ThisWorkbook.Protect Structure:=True, Windows:=True, Password:=work_book_password
Application.CommandBars("Ply").Enabled = False

End Sub
1 Answers

What I still need this code to do is make the developer tab not visible.

To hide developer tab using VBA, try this

Application.ShowDevTools = False
Related