I have a VBA project with a Module and a Userform. I want to use some variables from my module in my Userform.
Is it necessary that I declare these variables globally? I don't like global variables because they stay in memory after the code's execution, and I have to reset these variables one-by-one at the beginning of my macro. I can't use the keyword End to clear the variables from memory because I need to remember one or two of these variables. How do people usually do?
Edit: is there a way to pass a variable from the Userform to the module without creating a global variable?