I am new to VBA
I am designing a spreadsheet that is used in sports It has a list of players names down a columns with the different skills going across in rows divided in to halves Attack and Defence It has 16 players and 10 skills in Attacks section and 16 Players and 11 Skills In the Defence section.
at the intersection of the column and the rows etc Player's Name and Different Skill is a command button that when pushed total 1 to the contents of a cell in a different worksheet that changes workheets dependent of the setting of 1 of 2 toggleswitches etc 1st period of play and so on.
Altogether the are 338 Commands Buttons that act as a counter for each skill for each players. There is 2366 lines of code and Everthing is working well.
Now I want to create a log of the command bottons that are pushed It stores on another worksheet and on that worksheet there will be 5 columns of data dependent on which command button is pushed.
I can do it once and it stores the right data in the right sheet in the right column But I don't know how next time I push any command button I want to know how to index the rows
Etc I push the command button1 1 it counts 1 to the total under the skill and against the players name and stotres it on the right spreadsheet dependent on the toggle button
Now on the Log page I will look at a Cell called Set and store the number in that cell it stores what period of the game in another column and what phase of players Attack or Defence and in another column it stores the players name and in the final column it stores what skill.
Next time I push any command button I want it to store the same type of data the name and skill will change with the command button pushed but how to index the row like a dataform but 338 enter buttons
Help please
I am designing a spreadsheet that is used in sports It has a list of players names down a columns with the different skills going across in rows divided in to halves Attack and Defence It has 16 players and 10 skills in Attacks section and 16 Players and 11 Skills In the Defence section.
at the intersection of the column and the rows etc Player's Name and Different Skill is a command button that when pushed total 1 to the contents of a cell in a different worksheet that changes workheets dependent of the setting of 1 of 2 toggleswitches etc 1st period of play and so on.
Altogether the are 338 Commands Buttons that act as a counter for each skill for each players. There is 2366 lines of code and Everthing is working well.
Now I want to create a log of the command bottons that are pushed It stores on another worksheet and on that worksheet there will be 5 columns of data dependent on which command button is pushed.
I can do it once and it stores the right data in the right sheet in the right column But I don't know how next time I push any command button I want to know how to index the rows
Etc I push the command button1 1 it counts 1 to the total under the skill and against the players name and stotres it on the right spreadsheet dependent on the toggle button
Now on the Log page I will look at a Cell called Set and store the number in that cell it stores what period of the game in another column and what phase of players Attack or Defence and in another column it stores the players name and in the final column it stores what skill.
Next time I push any command button I want it to store the same type of data the name and skill will change with the command button pushed but how to index the row like a dataform but 338 enter buttons
Help please
Last edited: