Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhide column/row shortcut keys not working in xl2007 meatshield Excel Discussion (Misc queries) 0 June 29th 07 03:37 PM
Shortcut keys not working Manju Excel Worksheet Functions 2 August 26th 06 03:35 AM
Disable CUT via toolbars or shortcut keys sparx Excel Discussion (Misc queries) 0 April 30th 06 08:34 PM
Why are my auditing and forms toolbars disabled? plb Excel Discussion (Misc queries) 0 September 23rd 05 03:41 PM
how to display shortcut keys for icons on toolbars praveen Excel Discussion (Misc queries) 4 January 28th 05 01:24 AM


All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"