R
Roderick O'Regan
I've got a UserForm with a series of option buttons (I'm only using six here
but there could be up to 20) and have created an array for them.
Dim VarData(5) As Variant
VarData(0) = optRainbow
VarData(1) = optSmarties
VarData(2) = optMirage
VarData(3) = optGrass
VarData(4) = optClouds
VarData(5) = opt1Red
Using an If...Else if... statement might be OK for a few items but I believe
a Select Case would be better for larger quantities. (Am I correct?)
If I select one of the option buttons this will show which VarData array
variable is True. For the sake of argument, let's say that VarData(1) is
equal to True in this instance from my list above.
How could I use this value in a Select Case statement, perhaps, which if
VarData(1) is True it will indicate that a certain graphic is to be placed
in a document (e.g. c:\graphics\widget.jpg)?
I've written the array but cannot seem to harness the 'True' bit to an
expression.
Regards
Roderick O'Regan
but there could be up to 20) and have created an array for them.
Dim VarData(5) As Variant
VarData(0) = optRainbow
VarData(1) = optSmarties
VarData(2) = optMirage
VarData(3) = optGrass
VarData(4) = optClouds
VarData(5) = opt1Red
Using an If...Else if... statement might be OK for a few items but I believe
a Select Case would be better for larger quantities. (Am I correct?)
If I select one of the option buttons this will show which VarData array
variable is True. For the sake of argument, let's say that VarData(1) is
equal to True in this instance from my list above.
How could I use this value in a Select Case statement, perhaps, which if
VarData(1) is True it will indicate that a certain graphic is to be placed
in a document (e.g. c:\graphics\widget.jpg)?
I've written the array but cannot seem to harness the 'True' bit to an
expression.
Regards
Roderick O'Regan