"new" and "open" buttons on the standard menu


Posted by Jim on December 11, 2001 3:25 PM

Hi,
Could someone please show me how to delete or disable
these buttons, "New" & "Open".The actual buttons not
"New" and "Open" in the dropdown menu.
Thanks, Jim

Posted by Jacob on December 11, 2001 3:42 PM

Just use part of the code I previously posted

Private Sub Workbook_Activate()
Dim MyCommand As CommandBar
Set MyCommand = Application.CommandBars("Standard")

With MyCommand
.Controls("&New").Enabled = False
.Controls("&Open").Enabled = False


End With

End Sub


Private Sub Workbook_Deactivate()
Dim MyCommand As CommandBar
Set MyCommand = Application.CommandBars("Standard")

With MyCommand
.Controls("&New").Enabled = True
.Controls("&Open").Enabled = True


End With

End Sub


This will stop people from being able to use the open or new buttons on the command bar, but they can still use hot keys or the file menu.

Hope this helps

Jacob



Posted by Jim on December 11, 2001 4:03 PM

Thanks, Jacob it's working now!(nt)