Disabling Shortcut Keys 
Author Message
 Disabling Shortcut Keys

Hi,
 I am writing a word macro which disables certain functions such as printing
and saving based on the users name which is being pulled out of an .ini file
generated by an application. The problem is that although the functions are
being disabled ok, the shortcut keys still work (e.g. CTRL+P still works). I
have searched high and low for a workaround to this problem but to no avail.
If anybody can give me a solution I would be most grateful.

Thanks in advance,
Kieron



Sat, 25 Jan 2003 03:00:00 GMT  
 Disabling Shortcut Keys
Hi Keiron

Name a replacement subroutine the same as the function you want to disable:

Sub FileSave()
    MsgBox "This function has been disabled, because I didn't like the color
of your shoes today!"
end Sub

To determine the name of the functions, select Tools | Macro. (Alt-F8) From
the drop down list box, select "Word commands" . Locate the command you want
to replace. Select the template in which you want to save the new sub from
the drop down list, then click "Create"

A new sub with the correct name will be created for you in the template you
specified, with the code necessary for normal operation. Now you can make it
do anything you want it to.

HTH and have a great day.

---
~~~~~~~~~~~~~~~~~~~~~~
Stephen Lang
401 S. Carson Street
Carson City, NV 89703
775.684.6830
GMT-8
slangatlcb state nv us
~~~~~~~~~~~~~~~~~~~~~~
To respond via e-mail:


Quote:
> Hi,
>  I am writing a word macro which disables certain functions such as
printing
> and saving based on the users name which is being pulled out of an .ini
file
> generated by an application. The problem is that although the functions
are
> being disabled ok, the shortcut keys still work (e.g. CTRL+P still works).
I
> have searched high and low for a workaround to this problem but to no
avail.
> If anybody can give me a solution I would be most grateful.

> Thanks in advance,
> Kieron



Sat, 25 Jan 2003 03:00:00 GMT  
 Disabling Shortcut Keys
Hi Steve,
Thanks for the advice, using your suggestion to check word commands I found
a 'FindKey' disable command which has done the trick.
Cheers,
Kieron


Quote:
> Hi Keiron

> Name a replacement subroutine the same as the function you want to
disable:

> Sub FileSave()
>     MsgBox "This function has been disabled, because I didn't like the
color
> of your shoes today!"
> end Sub

> To determine the name of the functions, select Tools | Macro. (Alt-F8)
From
> the drop down list box, select "Word commands" . Locate the command you
want
> to replace. Select the template in which you want to save the new sub from
> the drop down list, then click "Create"

> A new sub with the correct name will be created for you in the template
you
> specified, with the code necessary for normal operation. Now you can make
it
> do anything you want it to.

> HTH and have a great day.

> ---
> ~~~~~~~~~~~~~~~~~~~~~~
> Stephen Lang
> 401 S. Carson Street
> Carson City, NV 89703
> 775.684.6830
> GMT-8
> slangatlcb state nv us
> ~~~~~~~~~~~~~~~~~~~~~~
> To respond via e-mail:



> > Hi,
> >  I am writing a word macro which disables certain functions such as
> printing
> > and saving based on the users name which is being pulled out of an .ini
> file
> > generated by an application. The problem is that although the functions
> are
> > being disabled ok, the shortcut keys still work (e.g. CTRL+P still
works).
> I
> > have searched high and low for a workaround to this problem but to no
> avail.
> > If anybody can give me a solution I would be most grateful.

> > Thanks in advance,
> > Kieron



Mon, 27 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. disabling shortcut keys

2. Disable shortcut keys in vb application

3. Disable shortcut keys in vb application

4. Disable shortcut keys in vb application

5. Disable ShortCut Key of Combox of Forms2.0 "Ctrl+C"

6. Can anyone tell me how to disable shortcut keys like Alt+Tab and Ctrl+Esc.

7. Can anyone tell me how to disable shortcut keys like 'Alt+Tab'.

8. How to disable Word shortcut keys

9. disable desktop shortcut keys

10. How to Disable windows shortcut keys??? vb4

11. How to disable right mouse button and some shortcuts keys (WebBrowser)

12. Disable right mouse shortcut keys in visual basic

 

 
Powered by phpBB® Forum Software