Treason
#@$%#!
- Local time
- Today, 17:28
- Joined
- Mar 12, 2002
- Messages
- 340
Assuming this:
Lets say I want to change one of those boolean values based on the middle character... for example
I want to set bln1Up = True if AddKey = 1...
or set bln2Up = True if AddKey = 2 etc..
Basically I am trying to change a variable value into a variable name...
If Addkey = 1
I want ("bg" & AddKey & "Up") = True to mean bg1up = True
What am I doing wrong?
Code:
Dim bln1Up, bln2Up, bln3Up as Boolean
Lets say I want to change one of those boolean values based on the middle character... for example
Code:
Private Sub Whatever()
Dim AddKey as Integer
If ("bg" & AddKey & "Up") = True Then
Call Correct
("bg" & AddKey & "Up") = False
Else
Call inCorrect
End If
End Sub
I want to set bln1Up = True if AddKey = 1...
or set bln2Up = True if AddKey = 2 etc..
Basically I am trying to change a variable value into a variable name...
If Addkey = 1
I want ("bg" & AddKey & "Up") = True to mean bg1up = True
What am I doing wrong?