DonAndress
Active Member
- Joined
- Sep 25, 2011
- Messages
- 362
- Office Version
- 2019
- 2016
- Platform
- Windows
Hello.
I have a code to run a UserForm, insinde I have some code that gives me a variable (it's inside a Private Sub, each Sub which belongs to UserForm is automatically Private).
I could store this variable in a call in workbook but maybe there is a way to transport this value back to parent Sub (from where this UserForm was previously run), say after clicking on a button?
Right now when I get to Unload Me part (this is run after clicking on a button) and the code goes back from UserForm to the original Sub, my variable disappears.
I have a code to run a UserForm, insinde I have some code that gives me a variable (it's inside a Private Sub, each Sub which belongs to UserForm is automatically Private).
I could store this variable in a call in workbook but maybe there is a way to transport this value back to parent Sub (from where this UserForm was previously run), say after clicking on a button?
Right now when I get to Unload Me part (this is run after clicking on a button) and the code goes back from UserForm to the original Sub, my variable disappears.
Last edited: