E
Ed
I hope that I can make this make sense.
I have several user forms called, e.g., "UserForm1" through "UserForm50"
I want to set a variable called "FormIs" to represent one of the user
forms. I want to select the appropriate user form from a dropdown list that
I have created, populated with the 50 UserForm names.
I have assign to the result of my selection from the dropdown list to
the variable SelectedName. The return value of SelectedName is a string
variable. SelectedName might have a value of "UserForm17", but that is not
the same as the form UserForm17.
I know how to assign FormIs to the actual object UserForm17. I just
type:
Set FormIs = UserForm17
But assigning FormIs to a string variable SelectedName cannot be done by
merely typing:
Set FormIs = SelectedName (because SelectedName is a variable, not an
object)
How can I convert FormIs or SelectedName to the actual object I want it
to represent?
I have several user forms called, e.g., "UserForm1" through "UserForm50"
I want to set a variable called "FormIs" to represent one of the user
forms. I want to select the appropriate user form from a dropdown list that
I have created, populated with the 50 UserForm names.
I have assign to the result of my selection from the dropdown list to
the variable SelectedName. The return value of SelectedName is a string
variable. SelectedName might have a value of "UserForm17", but that is not
the same as the form UserForm17.
I know how to assign FormIs to the actual object UserForm17. I just
type:
Set FormIs = UserForm17
But assigning FormIs to a string variable SelectedName cannot be done by
merely typing:
Set FormIs = SelectedName (because SelectedName is a variable, not an
object)
How can I convert FormIs or SelectedName to the actual object I want it
to represent?