On 2002-02-16 10:39, keithkemble wrote:
I don't think you can.
You can hide the code and stop access of the code if a Macro bombs out by going to vba editor ( alt F11) selecting Tools/properties
select protection tab and enter a password.
You can actually disable these controls
like so........
Dim CB As CommandBar
Dim C As CommandBarControl
Dim ID
Sub Disable_RightClick_ToolBar()
ID = 30017
For Each CB In Application.CommandBars
Set C = CB.FindControl(ID:=ID, recursive:=True)
If Not C Is Nothing Then C.Enabled = False
Next
Application.CommandBars("toolbar list").Enabled = False
Application.CommandBars("Visual Basic").Enabled = False
End Sub
Sub Enable_RightClick_ToolBar()
ID = 30017
For Each CB In Application.CommandBars
Set C = CB.FindControl(ID:=ID, recursive:=True)
If Not C Is Nothing Then C.Enabled = True
Next
Application.CommandBars("Toolbar List").Enabled = True
Application.CommandBars("Visual Basic").Enabled = True
End Sub
or something along these lines.....don't think I captured all of it...
Ivan