Disable Shortcut Menus / Alt-F8

P

Peter Rooney

Good afternoon, all!

As another afternoon winds its way to a close in sunny Lytham St Annes, just
a couple of tidyups to tie up this week's system once and for all.

Is there any way in which shortcut menus can be disabled, to prevent users
from inserting and deleting rows and columns, after I've spent so much time
customizing the menu bar to prevent this?

Also, is it possible to disable Alt-F8 to stop them running macros and
breaking everything?

Thanks in advance and have a good weekend

Regards

Pete
 
J

Jim Rech

You can use the OnKey method to disable any keystroke. For instance this
disables Ctrl-a:

Application.OnKey "^a", ""

See Help for more on OnKey.

You can do the same to Alt-F8 but you might just want to block your macro
names from appearing in the Macros dialog by adding Option Private Module at
the top of each module
 
P

Peter Rooney

Jim,

Thanks VERY much for the "Option Private Module" statement.
It's just what I needed.
Just the ShortCut menus to go now.

Have a good weekend

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top