Greetings From Salina, KS.
I am wanting to block VBE access to users on a small sample I am sending out. While I know this is close to impossible I am still wanting to make it as difficult as possible.
I am planning on using OZgrid's example to force users to accept macros to get to the workbook. I am going to add the following line, called from a Workbook_Open event, to close the VBE if it is already open.
Application.VBE.MainWindow.Visible = False
I am going to disable the shortcut keys use the OnKey method:
Application.OnKey "%{F11}", ""
Application.OnKey "%{F8}", ""
This effectively tells Excel to ignore the normal course of action for this combination of keys.
Also disable the menu option.
With Application.CommandBars("Tools").Controls
.Item("Macro").Enabled = False
End With
now I can only think of one way to get to VBE and that is right click on sheet tabs.
Is there simple code to disable the right click View Code menu item on ALL visible sheet tabs???
I am thinking all this MUST
be reversed on workbook close event!!
thanks
mweaver
I am wanting to block VBE access to users on a small sample I am sending out. While I know this is close to impossible I am still wanting to make it as difficult as possible.
I am planning on using OZgrid's example to force users to accept macros to get to the workbook. I am going to add the following line, called from a Workbook_Open event, to close the VBE if it is already open.
Application.VBE.MainWindow.Visible = False
I am going to disable the shortcut keys use the OnKey method:
Application.OnKey "%{F11}", ""
Application.OnKey "%{F8}", ""
This effectively tells Excel to ignore the normal course of action for this combination of keys.
Also disable the menu option.
With Application.CommandBars("Tools").Controls
.Item("Macro").Enabled = False
End With
now I can only think of one way to get to VBE and that is right click on sheet tabs.
Is there simple code to disable the right click View Code menu item on ALL visible sheet tabs???
I am thinking all this MUST
be reversed on workbook close event!!
thanks
mweaver