you have to put the code in a button or something else that will trigger it. just put it in the click event of a button...