Click on the Properties button
Click on your Button
Click on the Events tab in Properties.
The usual one you will want for a button is the On Click Event
Click next to that and choose Event procedure. Click just right of that and
open a Code Module.
Type your code just above the bit the says
End Sub
Best of luck!
Evi