This is really the VB rather than the VBA forum. However, to write an event handler, you simply need to use a particular naming convention, and you must use it as well. There isn't any way to specify a proc as handling a given event, and this is probably the source of your confusion.
In VB and in VBA, the convention is Sub ClassName_EventName(arglist), where ClassName is the name of the class (control) raising the event, and the event name and argument list are the actual event raised and the list of arguments defined by the class raising the event. For a simple example: Sub Command1_Click() is the event handler for a command button called Command1.
The particular IDE that you're working with will have a place where you can find a list of the available classes and potential events to be handled, select one such, and automatically place a template for the handler in your code. In VB, you simply need to double click on a control, and a default event handler template will show in your code. For example, double clicking on a command button in your IDE will place its click event in the code.
For more specific information, you will want to repost your question in the forum for the application that you're doing VBA code in. Also, googling to "VBA event handler" shows lots of articles.
HTH
Bob