Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Next Cell Selection

  1. #11
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,491
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by Stealth2016 View Post
    According to earlier posts it clearly states put all of this code into Thisworksheet. I get various errors but will try installing it into Standard Module and get back to you.
    You are not reading my guidance notes correctly - I separated code that goes in STANDARD & Thisworkbook modules & clearly stated where they are to be placed.

    Dave


    Dave

  2. #12
    New Member
    Join Date
    Oct 2016
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by dmt32 View Post
    You are not reading my guidance notes correctly - I separated code that goes in STANDARD & Thisworkbook modules & clearly stated where they are to be placed.

    Dave


    Dave
    That is exactly what I did with Both sets of Code. One in Standard Module and the Other In Thisworksheet. I then changed the Tab Order as stated. I have done everything as per the instructions. I will try to start the score sheet again and take down the error message for you.

  3. #13
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,491
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by Stealth2016 View Post
    That is exactly what I did with Both sets of Code. One in Standard Module and the Other In Thisworksheet. I then changed the Tab Order as stated. I have done everything as per the instructions. I will try to start the score sheet again and take down the error message for you.
    If you are still having problems then place copy of your workbook in a dropbox & provide link to it here.

    Dave

  4. #14
    New Member
    Join Date
    Oct 2016
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Next Cell Selection

    The error I am getting is
    Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) Highlighted in Yellow
    SetOnkey xlOff Highlighted in Blue
    End Sub

    I have no idea how to put a copy of workbook into a drop box - I am 70 Years Old and not good with internet etc.

  5. #15
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,491
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by Stealth2016 View Post
    The error I am getting is
    Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) Highlighted in Yellow
    SetOnkey xlOff Highlighted in Blue
    End Sub

    I have no idea how to put a copy of workbook into a drop box - I am 70 Years Old and not good with internet etc.
    That's no problem - I am similar age to you.

    what does the error message say?

    Dave

  6. #16
    New Member
    Join Date
    Oct 2016
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by dmt32 View Post
    That's no problem - I am similar age to you.

    what does the error message say?

    Dave
    Sub or Function Not Defined

  7. #17
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,491
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by Stealth2016 View Post
    Sub or Function Not Defined
    where have you placed this code?

    Code:
    Public Const TabSheet As String = "YourSheetName"
    
    
    
    
     Sub SetOnkey(ByVal state As Integer)
     '  Ver 2 2014
     ' Authors Dave Timms (aka DMT32) and  Jerry Sullivan MVP
    
    
    
    
        If state = xlOn Then
            With Application
                .OnKey "{TAB}", "'TabOrder xlNext'"             'Tab key
                .OnKey "+{TAB}", "'TabOrder xlPrevious'"        'Shift + Tab Key
                .OnKey "~", "'TabOrder xlNext'"                 'Enter Key
                .OnKey "{RIGHT}", "'TabOrder xlNext'"           'Right Arrow Key
                .OnKey "{LEFT}", "'TabOrder xlPrevious'"        'Left Arrow Key
                .OnKey "{DOWN}", "do_nothing"
                .OnKey "{UP}", "do_nothing"
            End With
        Else
        'reset keys
            With Application
                .OnKey "{TAB}"
                .OnKey "~"
                .OnKey "{RIGHT}"
                .OnKey "{LEFT}"
                .OnKey "{DOWN}"
                .OnKey "{UP}"
            End With
        End If
    End Sub
    It MUST be in a STANDARD module - NOT in a worksheet code page.

    Dave

  8. #18
    New Member
    Join Date
    Oct 2016
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Next Cell Selection

    Quote Originally Posted by dmt32 View Post
    where have you placed this code?

    Code:
    Public Const TabSheet As String = "YourSheetName"
    
    
    
    
     Sub SetOnkey(ByVal state As Integer)
     '  Ver 2 2014
     ' Authors Dave Timms (aka DMT32) and  Jerry Sullivan MVP
    
    
    
    
        If state = xlOn Then
            With Application
                .OnKey "{TAB}", "'TabOrder xlNext'"             'Tab key
                .OnKey "+{TAB}", "'TabOrder xlPrevious'"        'Shift + Tab Key
                .OnKey "~", "'TabOrder xlNext'"                 'Enter Key
                .OnKey "{RIGHT}", "'TabOrder xlNext'"           'Right Arrow Key
                .OnKey "{LEFT}", "'TabOrder xlPrevious'"        'Left Arrow Key
                .OnKey "{DOWN}", "do_nothing"
                .OnKey "{UP}", "do_nothing"
            End With
        Else
        'reset keys
            With Application
                .OnKey "{TAB}"
                .OnKey "~"
                .OnKey "{RIGHT}"
                .OnKey "{LEFT}"
                .OnKey "{DOWN}"
                .OnKey "{UP}"
            End With
        End If
    End Sub
    It MUST be in a STANDARD module - NOT in a worksheet code page.

    Dave
    Alt F11, Insert, Module - copied code in. Shows up in Objects, Sheet 1, Div 1

  9. #19
    Board Regular
    Join Date
    Jul 2012
    Location
    Hampshire, UK
    Posts
    4,491
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    looks like you have pasted it in Sheet1 code page - place it in a a STANDARD module.

    Dave

  10. #20
    Board Regular James006's Avatar
    Join Date
    Apr 2009
    Posts
    2,458
    Post Thanks / Like
    Mentioned
    10 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Next Cell Selection

    Hello,

    When it comes to any given game ... will the player who starts always be on the left ...?

Some videos you may like

User Tag List

Tags for this Thread

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
  •