Using the buttons on the board

How can i use an if/then statement to have my robot run a subprogram when one of the (A,B,C) buttons are pressed. I dont know how to define the buttons in the program.
Thanks

nevermind, i read up on the BUTTON command and got it all figured out.