ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable shortcuts (https://www.excelbanter.com/excel-programming/388511-disable-shortcuts.html)

Josh C

disable shortcuts
 
I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel

Gary''s Student

disable shortcuts
 
The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel


Josh C

disable shortcuts
 
i was hoping for a way to stop all the shortcuts without doing them
individually, do you know if it is possible

"Gary''s Student" wrote:

The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel


Vergel Adriano

disable shortcuts
 
Josh,

to programatically disable CTRL+C, you can do this:

Application.OnKey "^c", ""

to re-enable, you use

Application.OnKey "^c"

So, to disable/enable CTRL+KEY and CTRL+SHIFT+KEY shortcuts, you can do
something like this:


Sub DisableShortCuts()
Dim iChar As Integer

'disable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

'disable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

End Sub


Sub EnableShortCuts()
Dim iChar As Integer

're-enable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar)
Next iChar

're-enable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar)
Next iChar

End Sub


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

i was hoping for a way to stop all the shortcuts without doing them
individually, do you know if it is possible

"Gary''s Student" wrote:

The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel


Josh C

disable shortcuts
 
Thanks for the idea, it looks like it should work. My only question is where
did you come up with the range of numbers for the loop. they look like odd
numbers, if i knew where you came up with them i would feel better.

Tahnks Again, Josh

"Vergel Adriano" wrote:

Josh,

to programatically disable CTRL+C, you can do this:

Application.OnKey "^c", ""

to re-enable, you use

Application.OnKey "^c"

So, to disable/enable CTRL+KEY and CTRL+SHIFT+KEY shortcuts, you can do
something like this:


Sub DisableShortCuts()
Dim iChar As Integer

'disable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

'disable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

End Sub


Sub EnableShortCuts()
Dim iChar As Integer

're-enable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar)
Next iChar

're-enable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar)
Next iChar

End Sub


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

i was hoping for a way to stop all the shortcuts without doing them
individually, do you know if it is possible

"Gary''s Student" wrote:

The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel


Vergel Adriano

disable shortcuts
 
Josh,

Those numbers are ascii character codes. 97, for example is the ascii
character code for the uppercase A.

You can see the ascii table he
http://www.asciitable.com/


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

Thanks for the idea, it looks like it should work. My only question is where
did you come up with the range of numbers for the loop. they look like odd
numbers, if i knew where you came up with them i would feel better.

Tahnks Again, Josh

"Vergel Adriano" wrote:

Josh,

to programatically disable CTRL+C, you can do this:

Application.OnKey "^c", ""

to re-enable, you use

Application.OnKey "^c"

So, to disable/enable CTRL+KEY and CTRL+SHIFT+KEY shortcuts, you can do
something like this:


Sub DisableShortCuts()
Dim iChar As Integer

'disable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

'disable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

End Sub


Sub EnableShortCuts()
Dim iChar As Integer

're-enable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar)
Next iChar

're-enable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar)
Next iChar

End Sub


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

i was hoping for a way to stop all the shortcuts without doing them
individually, do you know if it is possible

"Gary''s Student" wrote:

The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel


Josh C

disable shortcuts
 
Thanks that site will be very helpful

"Vergel Adriano" wrote:

Josh,

Those numbers are ascii character codes. 97, for example is the ascii
character code for the uppercase A.

You can see the ascii table he
http://www.asciitable.com/


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

Thanks for the idea, it looks like it should work. My only question is where
did you come up with the range of numbers for the loop. they look like odd
numbers, if i knew where you came up with them i would feel better.

Tahnks Again, Josh

"Vergel Adriano" wrote:

Josh,

to programatically disable CTRL+C, you can do this:

Application.OnKey "^c", ""

to re-enable, you use

Application.OnKey "^c"

So, to disable/enable CTRL+KEY and CTRL+SHIFT+KEY shortcuts, you can do
something like this:


Sub DisableShortCuts()
Dim iChar As Integer

'disable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

'disable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar), ""
Next iChar

End Sub


Sub EnableShortCuts()
Dim iChar As Integer

're-enable CTRL+KEY shortcuts
For iChar = 97 To 122 'a to z
Application.OnKey "^" & Chr(iChar)
Next iChar

're-enable CTRL+SHIFT+KEY shortcuts
For iChar = 65 To 90 'A to Z
Application.OnKey "^" & Chr(iChar)
Next iChar

End Sub


--
Hope that helps.

Vergel Adriano


"Josh C" wrote:

i was hoping for a way to stop all the shortcuts without doing them
individually, do you know if it is possible

"Gary''s Student" wrote:

The usual short-cut for Copy is CNTRL-C.


To disable this, create a "do nothing" macro and assign CNTRL-C to it.
--
Gary''s Student - gsnu200718


"Josh C" wrote:

I could be looking in the wrong spot, but is there a easy way to disable the
shotcut options on MS Excel



All times are GMT +1. The time now is 03:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com