RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
So I have two userforms. I kind of get how to call a subroutine of a userform from another:
1. Ensure you declare the subroutine as Public
2. From Userform2, call the subroutine in Userform1 by using: Call Userform1.NameofSubRoutine
I'm following the progression of the code by stepping through the code. I'm finding that the code doesn't immediately run through Userform1.NameofSubRoutine, but instead first runs through Userform_Initialize of Userform1 before going to NameofSubRoutine of Userform1.
Why question is why does this happen? And is there anything I can do to prevent this from happening?
1. Ensure you declare the subroutine as Public
2. From Userform2, call the subroutine in Userform1 by using: Call Userform1.NameofSubRoutine
I'm following the progression of the code by stepping through the code. I'm finding that the code doesn't immediately run through Userform1.NameofSubRoutine, but instead first runs through Userform_Initialize of Userform1 before going to NameofSubRoutine of Userform1.
Why question is why does this happen? And is there anything I can do to prevent this from happening?