palaeontology
Active Member
- Joined
- May 12, 2017
- Messages
- 444
- Office Version
- 2016
- Platform
- Windows
I have the following UserForm that I use in scoring a school Cross Country Carnival.
The command buttons that are important to this query are the 'Start' button which when pressed timestamps the start of the race, and the nine buttons in the centre, which when pressed timestamps when a runner from that House crosses the line.
Code for 'Start' button is ....
Code for the 'Brad' (short for Bradman House) button is ...
The image below shows a snippet of the top few rows of data resulting from starting the race and students from various Houses crosing the line. You can see the codes (above) are sending their information to columns B and C.
This userform has worked well for years now, however, the kids are getting lazy (uggh) and often coming across the line in big groups of different Houses, so pressing the corresponding House buttons has to be done quickly, but there is usually a small delay between when a button has been pressed and when another button is ready to recognise that it has also been pressed.
Consequently, I can be pressing the House buttons as quickly as I can see the students crossing the line, but the program can't always keep up, and in my haste to keep up with the number of students crossing the line, I don't always notice that some of my presses haven't been recognised.
Can anyone see a better way of recording this cross country race, allowing for rapid entry of big groups of kids from different Houses crossing the line at the same time ?
I was thinking of adding a number pad to the right of the existing House buttons (on the same UserForm). The idea would be that if a big group (consisting of 4 students from Gould, 6 students from Bradman, and 7 students from Sutherland) crossed the line at the same time, instead of pressing the Gould button 4 times, the Bradman button 6 times and the Sutherland button 7 times) I could press the Gould button once followed by pressing the 4 on the number pad, press the Bradman button once followed by pressing the 6 on the number pad and press the Sutherland button once followed by pressing the 7 on the number pad.
What I can't figure is how to change the existing code to have the spreadsheet understand to timestamp 4 Gould runners, 6 Bradman runners and 7 Sutherland runners one after the other.
I'll keep thinking on how to do this, but if someone can think of a better way to achieve this, can you please let me know.
Kind regards,
Chris
The command buttons that are important to this query are the 'Start' button which when pressed timestamps the start of the race, and the nine buttons in the centre, which when pressed timestamps when a runner from that House crosses the line.
Code for 'Start' button is ....
VBA Code:
Private Sub CommandButton11_Click()
Range("A1").Value = Now()
End Sub
Code for the 'Brad' (short for Bradman House) button is ...
Code:
Private Sub CommandButton1_Click()
Range("B65536").End(xlUp).Offset(1, 0) = "Bradman"
Range("B65536").End(xlUp).Offset(0, 1) = Now()
End Sub
The image below shows a snippet of the top few rows of data resulting from starting the race and students from various Houses crosing the line. You can see the codes (above) are sending their information to columns B and C.
This userform has worked well for years now, however, the kids are getting lazy (uggh) and often coming across the line in big groups of different Houses, so pressing the corresponding House buttons has to be done quickly, but there is usually a small delay between when a button has been pressed and when another button is ready to recognise that it has also been pressed.
Consequently, I can be pressing the House buttons as quickly as I can see the students crossing the line, but the program can't always keep up, and in my haste to keep up with the number of students crossing the line, I don't always notice that some of my presses haven't been recognised.
Can anyone see a better way of recording this cross country race, allowing for rapid entry of big groups of kids from different Houses crossing the line at the same time ?
I was thinking of adding a number pad to the right of the existing House buttons (on the same UserForm). The idea would be that if a big group (consisting of 4 students from Gould, 6 students from Bradman, and 7 students from Sutherland) crossed the line at the same time, instead of pressing the Gould button 4 times, the Bradman button 6 times and the Sutherland button 7 times) I could press the Gould button once followed by pressing the 4 on the number pad, press the Bradman button once followed by pressing the 6 on the number pad and press the Sutherland button once followed by pressing the 7 on the number pad.
What I can't figure is how to change the existing code to have the spreadsheet understand to timestamp 4 Gould runners, 6 Bradman runners and 7 Sutherland runners one after the other.
I'll keep thinking on how to do this, but if someone can think of a better way to achieve this, can you please let me know.
Kind regards,
Chris