Dear all,
I am having difficulty with the whole idea of setting variables.
I want to declare a variable in one user form that then gets used in a different user form.
I have tried making sure all subs are not private, I have tried declaring the variable in the option explicit section. I have tried declaring it at the start of a sub etc. I have been told to try dim myvariable as public, that doesn't work, I have tried public myvariable and public dim myvariable, I've tried the help files - I'm going loopy!
Each time I run the routines the variable shows up in the locals window but then later in a different form the variable when called is empty.
Can anybody explain how I keep a variable in memeory to use anywhere within a workbook/form
Many thanks
Andy
I am having difficulty with the whole idea of setting variables.
I want to declare a variable in one user form that then gets used in a different user form.
I have tried making sure all subs are not private, I have tried declaring the variable in the option explicit section. I have tried declaring it at the start of a sub etc. I have been told to try dim myvariable as public, that doesn't work, I have tried public myvariable and public dim myvariable, I've tried the help files - I'm going loopy!
Each time I run the routines the variable shows up in the locals window but then later in a different form the variable when called is empty.
Can anybody explain how I keep a variable in memeory to use anywhere within a workbook/form
Many thanks
Andy