Add a code module to your program and break out pieces of your code into one or more Subs or Functions that you can call from the form.