Next Cell Selection

Stealth2016

New Member
Joined
Oct 26, 2016
Messages
34
I am trying to write an excel spreadsheet Darts Score Book for my local Dart League and need to be able to control the next cell selection for data input over 3 rows of 14 columns for each team (Triples Game). That is 84 cells in total (B7:O9 and Z7:AM9). First entry being Cell B7 then Z7, B8, Z8, B9, Z9, C7, AA7 etc. Can this be done. I also need to do this for Doubles and Singles matches.
 
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
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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.
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
looks like you have pasted it in Sheet1 code page - place it in a a STANDARD module.

Dave
 
Upvote 0
Hello,

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

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top