Results 1 to 9 of 9

Disable Ctrl+Enter using VBA

Threaded View

s1myr Disable Ctrl+Enter using VBA 10-27-2016, 07:34 AM
Andy Pope Re: Disable Ctrl+Enter using... 10-28-2016, 03:46 AM
s1myr Re: Disable Ctrl+Enter using... 10-28-2016, 04:35 AM
Andy Pope Re: Disable Ctrl+Enter using... 10-28-2016, 05:35 AM
s1myr Re: Disable Ctrl+Enter using... 10-28-2016, 08:23 AM
Andy Pope Re: Disable Ctrl+Enter using... 10-28-2016, 08:54 AM
s1myr Re: Disable Ctrl+Enter using... 10-28-2016, 10:40 AM
alansidman Re: Disable Ctrl+Enter using... 10-28-2016, 10:41 AM
s1myr Re: Disable Ctrl+Enter using... 10-28-2016, 10:52 AM
  1. #1
    Registered User
    Join Date
    10-27-2016
    Location
    London, England
    MS-Off Ver
    Office 2013
    Posts
    5

    Disable Ctrl+Enter using VBA

    Hi.

    I have successfully restricted Paste, Ctrl+r and Ctrl+d in a workbook when a worksheet is protected using the following, but it is failing to disable Ctrl+Enter using both "^{ENTER}" and "^~", "":

    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    If Not Sh.ProtectContents Then Exit Sub
    Application.CutCopyMode = False
    Application.OnKey "^d", ""
    Application.OnKey "^r", ""
    Application.OnKey "^{ENTER}", ""
    Application.OnKey "^~", ""
    End Sub
    Have I done something wrong or is there another way to restrict Ctrl+Enter? (FYI I have tried using both "Enter" and "ENTER")

    Thanks
    Last edited by alansidman; 10-28-2016 at 10:41 AM. Reason: code tags added

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 12-23-2015, 03:03 AM
  2. Disable cut,copy,paste(including ctrl x, ctrl c n ctrl v)
    By Ramboexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2014, 01:00 AM
  3. With VBA Enter Ctrl Shift Enter For Array Formula
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-17-2013, 09:02 AM
  4. how to disable ctrl c and ctrl v
    By slmi1313 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-18-2011, 03:04 PM
  5. What does Ctrl+Shift+Enter do? How does it differ from Enter?
    By George Furnell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2006, 02:45 AM
  6. Replies: 2
    Last Post: 10-20-2005, 05:05 PM
  7. ctrl+shift+enter vs enter
    By tkaplan in forum Excel General
    Replies: 7
    Last Post: 05-27-2005, 12:10 PM

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