Setting Keyboard Functions

elgringo56

Well-known Member
Joined
Apr 15, 2002
Messages
869
Good morning, everyone. I was wondering if any one knew of a way to set, under macro control, the "Caps Lock" function on the keyboard?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
On 2002-05-11 06:37, elgringo56 wrote:
Good morning, everyone. I was wondering if any one knew of a way to set, under macro control, the "Caps Lock" function on the keyboard?


Why do want to be able to switch CapsLock on and off with a macro?
 
Upvote 0
Hi ElGringo56

couple of Q's

1) Why do you want to turn it Off/On
As there may be another way to achieve what you require.
2) What error are you getting ?
 
Upvote 0
Well, I want the operator to only type in caps on some sheets, so I want to set that up for her so she doesn't have to worry about it or a new operator cant make a mistake there.

I get a compile error on it. I am not even sure what I should see here, Ivan. I dont know what this code is trying to do, to inexperianced.
 
Upvote 0
On 2002-05-11 14:09, elgringo56 wrote:
Well, I want the operator to only type in caps on some sheets, so I want to set that up for her so she doesn't have to worry about it or a new operator cant make a mistake there.

I get a compile error on it. I am not even sure what I should see here, Ivan. I dont know what this code is trying to do, to inexperianced.

Hi Elgringo56

Please Post to this thread...starting a new
one makes it differcult to keep track and
may waste time for posters when it may
have been answered in the other thread.

When the error occurs what does it say and
where/what line does it stop @?
 
Upvote 0
this line is highlighted

Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Long

And it says "Compile error, only comments may appear after end sub, end function or end property
 
Upvote 0
Ivan, setting it with the page didn't work out to well. There are things I want in lower case on the page, but I want all her entrys to be upper case, so I guess I want to be able turn on and off the upper case with the macro. By the way, thanks for your help
 
Upvote 0
On 2002-05-11 14:27, elgringo56 wrote:
this line is highlighted

Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Long

And it says "Compile error, only comments may appear after end sub, end function or end property

The code I gave should be Pasted to a new Module......so in the VBE

Insert a New Module and Paste here.
Don't forget to remove the code from any
other modules you may have pasted this to.
 
Upvote 0

Forum statistics

Threads
1,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top