View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Holmes Bob Holmes is offline
external usenet poster
 
Posts: 13
Default Preventing shortcut keys from working on disabled toolbars

Hello,
I'm trying to develop a small data entry front-end for a database using
Excel. I would like to limit the things that the user can do to editing and
printing. I have been experimenting with creating a custom menu bar and
disabling the existing menu and toolbars. There are two things that I don't
seem to be able to do.
First - I can disable the menu bar ("Worksheet Menu Bar") and create a new
menu, but I can't prevent the user from using 'ctrl' keys to perform the
same features that I'm trying to stop by disabling the menu.
Second - I would like to use the Workbook_BeforeClose event to restore the
menu and toolbars. I wrote a routine to keep track of visible toolbars. I
can disable them and then run the routine to restore them. If I place code
in the "BeforeClose" event, the routine runs and all of my variables show
the correct values, but nothing happens.

Ideally, what I would like is to have this workbook appear as a stand-alone
application with it's own toolbar and menu with no access to any other
features. And, to not have my customization affect any other workbooks.

I would appreciate it very much if someone could give me a clue about either
of these problems. Thank you.
I'll be happy to provide my code if would help get a solution.