+ Reply to Thread
Results 1 to 4 of 4

Disable <+> and <`> keystrokes

  1. #1
    Registered User
    Join Date
    01-19-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    26

    Disable <+> and <`> keystrokes

    Hi guys

    I need to disable every possible keystroke in a sheet.

    I have managed to do it with every key but the <`> and the operational keys (<+> <*> and stuff) in the numeric keyboard (numlock).

    How can I disable those keys?

    Btw, I have used the application.onkey to disable every other key.

    Thanks in advance

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Disable <+> and <`> keystrokes

    Why do you want to scare users into closing Excel and/or turning off their computers?

    Locking every cell and protecting the sheet is a more graceful way of preventing the user from changing a worksheet.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    01-19-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Disable <+> and <`> keystrokes

    Quote Originally Posted by mikerickson View Post
    Why do you want to scare users into closing Excel and/or turning off their computers?

    Locking every cell and protecting the sheet is a more graceful way of preventing the user from changing a worksheet.
    There's two things I need to do:

    First, I need to determinate which cells the user can select and which he can't. I do this by using the sheet protection/locking.

    Second, although I wan't the user to be able to select the remaining cells, the data entry is made through forms, so, he shouldn't type stuff directly into the unlocked cells, but double-click it, in order to open the userforms.

    Also, disabling keystrokes with the onkey will take effect only in excel, and, moreover, using the workbook activate, deactivate, beforeclose and open events, no other sheet should be effected. I don't thing the user would get scared at all.

    Thanks for your help.

  4. #4
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Disable <+> and <`> keystrokes

    If they can't change the data in a cell then lock it, but allow them to select locked cells.
    And use Worksheet_SelectionChange() to launch your form

    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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