Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Preventing shortcut keys from working on disabled toolbars
Thanks. I'll read up on that.
-- Bob Holmes MCNGP #31 "Township of East Hanover" wrote in message ... Have you looked into Application.Onkey, I think that you have to put it on the Workbook.Open event. Rui "Bob Holmes" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Preventing shortcut keys from working on disabled toolbars
I looked at 'OnKey' and it seems to be a way of specifying keyboard
shortcuts to run a routine. I was hoping that their was a simple way of telling Excel that if the menu is disabled, then disable all of the functionality on that menu, e.g. If I disable the 'Edit' command from the menu (or disable the entire menu bar), I don't want the user to be able to use 'ctrl-C' to copy. However, if I add the copy feature to a custom menu, then the shortcut should work. Regarding my second issue, is there some reason that my code to restore the original menu and toolbars does not work from the 'BeforeClose' event. Perhaps this code should be in another event in order to work. If anyone has any other suggestions, I would be very grateful to hear them. Thank you. -- Bob Holmes "Township of East Hanover" wrote in message ... Have you looked into Application.Onkey, I think that you have to put it on the Workbook.Open event. Rui "Bob Holmes" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unhide column/row shortcut keys not working in xl2007 | Excel Discussion (Misc queries) | |||
Shortcut keys not working | Excel Worksheet Functions | |||
Disable CUT via toolbars or shortcut keys | Excel Discussion (Misc queries) | |||
Why are my auditing and forms toolbars disabled? | Excel Discussion (Misc queries) | |||
how to display shortcut keys for icons on toolbars | Excel Discussion (Misc queries) |