+ Reply to Thread
Results 1 to 4 of 4

Capital Letters

  1. #1
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346

    Capital Letters

    My application requires the user to enter the data in a cell only in capital letters. He normally puts the keyboard in "CAPSLOCK" on mode. But in case he forgets and notices that letters are not in capital he has to put the CAPSLOCK on and re-enter the data. How do I code in VBA to put the keyboard in CAPSLOCK on mode? In that case the user won't have to bother to switch on capslock.

    Thanks

    A V Veerkar

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning avveerkar

    Stick this code into a class module and call it Class1 :
    Please Login or Register  to view this content.
    Then put this in a normal module :
    Please Login or Register  to view this content.
    Every time the macro "test" is called, the caps lock state will toggle on / off. This routine won't work with Windows 95.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346
    Thanks a lot DominicB. It works beautifully. I didn'tunderstand a word of what you put in Class1 module - I simply copy-pasted it and it works like a charm. I should have responded much earlier but I was away for a few days and didn't access the forum.

    I would like to understand the code you put in Class1. Where can I get the dope? I will be good to know that part as well. I am reasonably comfortable at VBA for excel

    Thanks a million again. It was wonderful.

    A V Veerkar

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    Cool!
    All hail dominicb
    Regards

    Rick
    Win10, Office 365

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1