Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Setting Keyboard Functions

  1. #11
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    That put the word CAPS LOCK in the selected cell

  2. #12
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hmmm you think there would be and easy way to send a keystroke to the computer.
    However I just found an interesting article on the API solution called "API: Replacement for Sendkeys"
    http://www.mvps.org/access/api/api0046.htm

    [ This Message was edited by: Nimrod on 2002-05-11 09:10 ]

  3. #13

    Join Date
    Mar 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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?


  4. #14
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 ?
    Kind Regards,
    Ivan F Moala From the City of Sails

  5. #15
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

  6. #16
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 @?
    Kind Regards,
    Ivan F Moala From the City of Sails

  7. #17
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  8. #18
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  9. #19
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.
    Kind Regards,
    Ivan F Moala From the City of Sails

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •