View Full Version : Caps Lock
Coolmo
2004-06-21, 07:08 PM
Is there any way to access the Caps Lock switch from VBA?
RobertB
2004-06-22, 12:02 AM
I thought there was something in the Exchange. Check there.
jwanstaett
2004-06-22, 03:02 PM
you can use the window api to get the state of the cap lock
Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Public Const VK_CAPITAL = &H14
If GetKeyState(VK_CAPITAL) = 0 Then
MsgBox "Caps Lock Is Off", vbOKOnly, "Caps Lock Check by John w Anstaett"
End If
see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefgetkeystate.asp
Ed Jobe
2004-06-22, 03:04 PM
I wrote a class that toggles the caps lock whenever you switch applications. If you are interested, I'll dig it up.
jwanstaett
2004-06-23, 01:12 PM
I thought there was something in the Exchange. Check there.yes see Exchange EX001163
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.