RE: Send Keys



The syntax you need to use is:-

Application.SendKeys("{CAPSLOCK}")

but I can't get that to work either. Why not allow users to type their data
into the user form and then use the UCase function to change it?

"Sgwapt" wrote:

> Hello All,
>
> I have used the SendKeys method but having trouble with this one.
> When a user form is initialized I would like to check if the CapsLock key is
> on and then if not turn it on so users entries are consistent with text
> strings. I know how to add the if but the key method is not working
>
> Here are 2 examples I tried;
> SendKeys CAPSLOCK
> SendKeys = {CAPSLOCK}
>
> What am I doing wrong?
>
> Thanks
> --
> George G
.



Relevant Pages

  • Re: SendKeys under Windows Vista with VB3
    ... As far as I know SendKeys works okay in a compiled VB6 exe but you get ... SendMessage and all sorts of stuff, in various ways, sometimes when UAC is ... Private Const KEYEVENTF_KEYUP As Long = &H2 ... Dim capslock As Boolean ...
    (microsoft.public.vb.general.discussion)
  • Re: Automatically Selecting "Yes" in an Externally Called Message Box
    ... SendKeys is unreliable because it writes to the active window. ... a macro (say, MyMacro) from MyWorkbook. ... Why is the SendKeys Method so quirky? ...
    (microsoft.public.excel.programming)
  • [PATCH] adbhid: produce all capslock key events
    ... behavior with regard to the capslock key. ... keycode when capslock is disengaged. ... +adbhid_input_keycode(int id, int scancode, int repeat) ...
    (Linux-Kernel)
  • Re: Help with SENDKEYS?
    ... Karl is right- the SendKeys method tends to be querky. ... used it is in the Palm programming environment and once in MS Word when I ... Shell strcmd, vbMaximizedFocus ...
    (microsoft.public.word.vba.general)
  • [PATCH 0/2] Input: adbhid - restore_capslock_events fixes
    ... They fix 2 out of 3 problems I know of in the simulation of capslock ... but I know that the "capslock key up" packet is never ... adbhid - fix capslock key state after suspend ...
    (Linux-Kernel)