Working with an Option Button Array and Checkbox Button Array 
Author Message
 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



Fri, 07 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Working with Option Button/Checkbox Arrays

2. option button control array - won't work

3. Option Button Control Array Not Working

4. Puzzle with Array of Option Buttons

5. Option Button control Array problem

6. Option Button array

7. Using Frames containing option buttons as control arrays

8. Run-Time Control Array of Option Buttons w/in Frames

9. Index of Selected Option Button in Array

10. option button array parameter

11. Reading Option Button Arrays

12. Control arrays with option buttons

 

 
Powered by phpBB® Forum Software