VBA - To Create List Box, which determines what section of code to run
Posted on 2013-08-31
Please bare with me as I try to explain... :) And keep in mind, I basically only know how to copy & paste VBA code, and I can just barely slightly - customize code myself.
I am creating a macro to be run on an email, but if I continue the way I'm going, - I'll have many different macros.
Ultimately, I would like this...
1.) Macro is run.
2.) A userform opens, which contains a list box.
3.) List box choices are: "Sample Request", "Product Return", "Quote Request".
If the user selects "Sample Request", I want the code to jump to my section of code for "Sample Request". If the user selects "Product Return", I want the code to jump to the code for "Product Return".
I am hoping for someone to write some sample code, that will jump to sections of a code based on what is selected in a listbox on a userform.
I do know how to create a userform in Outlook, and I know how to add the listbox - but I have no clue how to code, or to get any values inside of the listbox, and I have no idea how to make the code execute certain sections depending on what is selected.
I HOPE that made sense!
Thank you in advance for your help!