Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by ArviLaanemets View Post
    As I did show in my post #10, there is no need for 2nd 'Select Case Shift' cycle
    Thanks for replying Arvilaaements


    I tried all three methods as suggested by you but don't know why it is not working properly.
    Thank you.

    Code:
    ----1-----
     
     Select Case Shift
        Case Value17fShift
        Case 0 To 16, 18 To 66, 68 To 85, 87 To 255
            
        Case Value18fShift
        Case 0 To 17, 19 To 255
    End Select
    
    
    ----2-----
    
    
    Select Case Shift
        Case Value17Shift
        Case 0 To 16, 18 To 66, 68 To 85, 87 To 255
        Case Value18Shift
        Case 0 To 17, 19 To 255
    End Select
    
    ----3-----
    
    Select Case Shift
        Case acCtrlMask
        Case 0 To 16, 18 To 66, 68 To 85, 87 To 255
            
        Case acAltMask
        Case 0 To 17, 19 To 255
    End Select

  2. #17
    Join Date
    Apr 2017
    Posts
    1,681
    You didn't need 2nd instance of SELECT CASE Shift, but you need the 1st instance of SELECT CASE Shift to contain some instances of SELECT CASE keycode
    Code:
        Select Case Shift
            Case acCtrlMask
                Select Case keycode
                    Case 0 To 16, 18 To 66, 68 To 85, 87 To 255
                        keycode = 0
                End Select
            Case acAltMask
                Select Case keycode
                    Case 0 To 17, 19 To 255
                        keycode = 0
                End Select
        End Select

  3. #18
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by ArviLaanemets View Post
    You didn't need 2nd instance of SELECT CASE Shift, but you need the 1st instance of SELECT CASE Shift to contain some instances of SELECT CASE keycode
    Code:
        Select Case Shift
            Case acCtrlMask
                Select Case keycode
                    Case 0 To 16, 18 To 66, 68 To 85, 87 To 255
                        keycode = 0
                End Select
            Case acAltMask
                Select Case keycode
                    Case 0 To 17, 19 To 255
                        keycode = 0
                End Select
        End Select
    Thanks for replying arvilaanemets
    I have tried replacing this code with the previous code and practically it is not working properly.
    Actually with this code alt f4 key is not working on the form.

  4. #19
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Best to describe exactly what you are trying to achieve rather than dance around what you are doing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Micron View Post
    Best to describe exactly what you are trying to achieve rather than dance around what you are doing.
    Hello Micron, if I say directly, I want to disable all shortcut keys except ctrl C, ctrl v and alt f4, for this the code shown by me in post #1 is working but Arvilaanemets says that This can also be possible with the short code mentioned in his post #17, which is impossible for me as of now.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 20
    Last Post: 10-13-2015, 09:05 AM
  2. Replies: 3
    Last Post: 10-16-2014, 08:49 AM
  3. Report Code is not allowing return to main code
    By rcwiley in forum Programming
    Replies: 2
    Last Post: 06-16-2013, 10:31 AM
  4. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  5. Replies: 1
    Last Post: 05-04-2013, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums