hans_cellc
Member
- Joined
- Mar 23, 2012
- Messages
- 18
- Programming Experience
- Beginner
I have gloabalVar.otion1 as a variable.
User needs to input his option into a textbox from a dropdown input.
I want to use that input as the variable name and assign some other value to that. Below what I thought might work but does not seem to.
First try:
and the I tried to assign the textbox to a variable and then calling it:
This I can understand why because I dont have that name in globalVar.
How can I use the texbox1.text as the variables name?
User needs to input his option into a textbox from a dropdown input.
I want to use that input as the variable name and assign some other value to that. Below what I thought might work but does not seem to.
First try:
VB.NET:
globalVar.(textbox1.text).add(textbox5.text)
and the I tried to assign the textbox to a variable and then calling it:
VB.NET:
varName = textbox1.text
globalVar.varName.add(textbox5.text)
This I can understand why because I dont have that name in globalVar.
How can I use the texbox1.text as the variables name?