Hi
This should do the trick.
Private Sub Workbook_Activate()
Dim MyCommand As CommandBar
Set MyCommand = Application.CommandBars("Worksheet Menu bar")
With MyCommand
.Controls("&File").Controls("&New...").Enabled = False
.Controls("&File").Controls("&Open...").Enabled = False
End With
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("Worksheet Menu bar")
With MyCommand
.Controls("&File").Controls("&New...").Enabled = True
.Controls("&File").Controls("&Open...").Enabled = True
End With
Set MyCommand = Application.CommandBars("Standard")
With MyCommand
.Controls("&New").Enabled = True
.Controls("&Open").Enabled = True
End With
End Sub
Also you will need to deactivate the ctrl O and ctrl N hot keys. For this just make a macro and assign O and N as the keyboard shortcut. You dont need to put any code in the macro, but this will make the hotkey run the macro instead of opening or making a new File.
Hope this helps.
Jacob