ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Onkey Method (https://www.excelbanter.com/excel-programming/288868-onkey-method.html)

Fred Lambelet

Onkey Method
 
I want to disable + and - keys on numeric keypad. How
do I express these keys as a string for Onkey method of
Application object. These keypad keys are apparently
"different" keys than the keys on the regular keyboard. I
have no problem disabling these same keys on the regular
keyboard, using:

Application.Onkey "-", ""
Application.Onkey "{+}", ""

On my keyboard (Gateway notebook), you press and hold the
Fn key while pressing a number or the plus key on the keys
that are embedded in the keyboard, or you can press
Fn+Pad Lock to lock on the embedded numeric keypad.

Thanks for your help!

Fred Lambelet



Vasant Nanavati

Onkey Method
 
The consensus is that it is generally not possible, though IIRC some have
reported that using codes such as {107} works for certain PCs.

--

Vasant



"Fred Lambelet" wrote in message
...
I want to disable + and - keys on numeric keypad. How
do I express these keys as a string for Onkey method of
Application object. These keypad keys are apparently
"different" keys than the keys on the regular keyboard. I
have no problem disabling these same keys on the regular
keyboard, using:

Application.Onkey "-", ""
Application.Onkey "{+}", ""

On my keyboard (Gateway notebook), you press and hold the
Fn key while pressing a number or the plus key on the keys
that are embedded in the keyboard, or you can press
Fn+Pad Lock to lock on the embedded numeric keypad.

Thanks for your help!

Fred Lambelet





Fred Lambelet

Onkey Method
 
Vasant,
Thanks!
The {107} did work to disable the numeric keypad + key on
my computer at least. Do you know if there is a similar
code for the minus (-) key?

What I want to use this for is to prevent users from
entering formulas into unlocked data entry cells. If I
disable the = key, the formula bar, and the Insert
function menu item, I figure I can suppress this
activity. Is this approach feasible? Is there anything
else I need to look into?

What is this IIRC you referred to? I am pretty much a
novice.

Thanks again!
-----Original Message-----
The consensus is that it is generally not possible,

though IIRC some have
reported that using codes such as {107} works for certain

PCs.

--

Vasant



"Fred Lambelet" wrote in message
...
I want to disable + and - keys on numeric keypad. How
do I express these keys as a string for Onkey method of
Application object. These keypad keys are apparently
"different" keys than the keys on the regular

keyboard. I
have no problem disabling these same keys on the regular
keyboard, using:

Application.Onkey "-", ""
Application.Onkey "{+}", ""

On my keyboard (Gateway notebook), you press and hold

the
Fn key while pressing a number or the plus key on the

keys
that are embedded in the keyboard, or you can press
Fn+Pad Lock to lock on the embedded numeric keypad.

Thanks for your help!

Fred Lambelet




.


Vasant Nanavati

Onkey Method
 
IIRC = "If I Recall Correctly"

That 107 was pulled out of some deep recess of my mind. If you do a search
on Google groups, you should be able to find some references.

To get you started:

http://google.com/groups?as_q=onkey%...roup=*ex cel*

Lots of conflicting information there, based on a cursory review!

--

Vasant



"Fred Lambelet" wrote in message
...
Vasant,
Thanks!
The {107} did work to disable the numeric keypad + key on
my computer at least. Do you know if there is a similar
code for the minus (-) key?

What I want to use this for is to prevent users from
entering formulas into unlocked data entry cells. If I
disable the = key, the formula bar, and the Insert
function menu item, I figure I can suppress this
activity. Is this approach feasible? Is there anything
else I need to look into?

What is this IIRC you referred to? I am pretty much a
novice.

Thanks again!
-----Original Message-----
The consensus is that it is generally not possible,

though IIRC some have
reported that using codes such as {107} works for certain

PCs.

--

Vasant



"Fred Lambelet" wrote in message
...
I want to disable + and - keys on numeric keypad. How
do I express these keys as a string for Onkey method of
Application object. These keypad keys are apparently
"different" keys than the keys on the regular

keyboard. I
have no problem disabling these same keys on the regular
keyboard, using:

Application.Onkey "-", ""
Application.Onkey "{+}", ""

On my keyboard (Gateway notebook), you press and hold

the
Fn key while pressing a number or the plus key on the

keys
that are embedded in the keyboard, or you can press
Fn+Pad Lock to lock on the embedded numeric keypad.

Thanks for your help!

Fred Lambelet




.





All times are GMT +1. The time now is 10:39 AM.

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