
Working with an Option Button Array and Checkbox Button Array
Still relatively new to VB5 and have been busting my head over how to assign
the value of option button array index or checkbox button array indexvalue
to a variable. I believe that this is working, still early in development
but I know that it is not efficient.
Below is a sample of what I have done, what I want is if the on of the 4
option buttons is selected then assign that value to my variable, I will be
doing the same thing with check boxes in another area of my program. A
Select Case will then run and call a subprocedure based on the value of the
variable. What is the most efficient way to do this, with these option
buttons and checkbox arrays?
TIA,
Alan
Private Sub cmdCalc_Click()
Dim intType As Integer
intType = optPattern(0) Or optPattern(1) Or optPattern(2) Or
optPattern(3)
Select Case intType
Case 0
Call Apples
Case 1
Call Oranges
Case 2
Call Lemons
Case 3
Call Bananas
End Select
End Sub