austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
Ok ...so I have a userForm (Form1) that contains a persons name that I would like to reference in a separate UserForm (Form2). In the separate UserForm (Form2) I need to reference this persons name many times, so I was wondering if there was a was to declare this name in the separate UserForm (Form2) as a constant. Only thing is that a constant, to the best of my knowledge, must be an expression and not a variable. Mainly, I'm trying to avoid declaring the myName variable in each Sub within Form2, which it will be needed for a ton of Sub's. Any ideas would be appreciated.
This is what I'm tying to do, but wondering if there is a better way to do this??
code for Form2:
This is what I'm tying to do, but wondering if there is a better way to do this??
code for Form2:
Code:
Const myName As String = Form1.txtName.Value