I searched and found Ivan's code for disabling all methods of viewing code here:
The first line in the sub, however, is giving me a runtime error '1004', Programmatic access to VB project is not trusted.
Other than that line, everything works great... any ideas on a fix?
Thanks!
Code:
Sub DisableGettingIntoVBE()
Application.VBE.MainWindow.Visible = False '// Close ALL windows 1st!
CmdControl 1695, False '// Visual basics Editor
CmdControl 186, False '// Macros...
CmdControl 184, False '// Record New Macro...
CmdControl 1561, False '// View Code
CmdControl 1605, False '// Design Mode
Application.OnDoubleClick = "Dummy"
CommandBars("ToolBar List").Enabled = False
Application.OnKey "%{F11}", "Dummy"
End Sub
The first line in the sub, however, is giving me a runtime error '1004', Programmatic access to VB project is not trusted.
Other than that line, everything works great... any ideas on a fix?
Thanks!