Kelinky_Sama
New Member
- Joined
- Aug 27, 2016
- Messages
- 6
I'm not entirely sure if that name is the most understandable. Oh, well.
This falls in the same general vein as the last question I asked (which has been answered, and I am quite thankful for that), but plays out in reverse. I'll use a similar example situation for consistency.
Now, say that I have a UserForm which contains the string variable "Nickname", which has been given the value "Melvin". In a separate module, I have another string variable, "Catalogue.Names". Within the UserForm, the value for Label1.Caption is "Catalogue". I would like to use this value, in conjunction with the text ".Names", to let the value for "Catalogue.Names" be equal to that of "Nickname". Consider the following:
As can be expected, this only results in a syntax error.
Is there any way to work around this? Using the label's caption is rather important, since its value would change depending on circumstance. I would really appreciate the help.
This falls in the same general vein as the last question I asked (which has been answered, and I am quite thankful for that), but plays out in reverse. I'll use a similar example situation for consistency.
Now, say that I have a UserForm which contains the string variable "Nickname", which has been given the value "Melvin". In a separate module, I have another string variable, "Catalogue.Names". Within the UserForm, the value for Label1.Caption is "Catalogue". I would like to use this value, in conjunction with the text ".Names", to let the value for "Catalogue.Names" be equal to that of "Nickname". Consider the following:
HTML:
Dim Nickname As String
Nickname = "Melvin"
Me.Label1.Caption & ".Names" = Nickname
As can be expected, this only results in a syntax error.
Is there any way to work around this? Using the label's caption is rather important, since its value would change depending on circumstance. I would really appreciate the help.