Question:
I am getting the error: INCORRECT NUMBER OF EVENT PROCEDURE ARGUMENTS. This has been occuring ever since I created a control array of command buttons. I have to complete my project by tomorrow. Please Help!
Answer:
I would guess that somewhere you have code in a Click event for one of those buttons. The quickest way to resolve this problem is this:
- Cut the code for the command buttons
- Highlight the entire event procedure, including the declaration and the End Sub, and delete it.
- Select the Command button array in the object list, and select the Click event.
- You’ll see that the parameters to the click now include the Index property, which was probably missing before.
- Paste in your code, making sure to remember that you have to check the index of the button to determine which button activated.