This question is related to another question I asked on the Forum today and which was very kindly answered by Idle_Mind.
I have a Global Boolean variable in my project in a Visual Basic .NET Project named YesNo01. This YesNo01 is declared in a Module1 of my Project.
I wish to write some code along the following lines
1. If YesNo01 = True Then
2. MessageBox.Show (“YesNo01 = True”)
3. Else
3. MessageBox.Show (“YesNo01 = False”)
4. End if
However I do not want to use the actual Name of YesNo01 in statement No 1. Instead I wish to say something like the following:
Dim myString as String
myString = “YesNo01”
If myString = True Then
MessageBox.Show (“YesNo01 = True”)
Else
MessageBox.Show (“YesNo01 = False”)
End if
Thank you for your help in anticipation.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.