Greetings,
I'm currently setting up a script that will select an array based on
specific criteria. I'm using the select case method. The problem is that I
want the user to select a radio button and the value of that radio button
will determine the array to use.
I have the 5 options buttons named optOne, optTwo, etc...
I have one frame named fraFormat
The option buttons are part of the group grpFormat
At the bottom of the form I have a button that is named cmdFormat
I have this function that will assign values to an array
Function Selection(OpUnitFormat)
Select Case OpUnitFormat
Case 1
strOpUnitProd(1) = ""
strOpUnitProd(2) = ""
strOpUnitProd(3) = ""
strOpUnitProd(4) = ""
strOpUnitProd(5) = ""
Case 2
strOpUnitProd(1) = ""
strOpUnitProd(2) = ""
strOpUnitProd(3) = ""
strOpUnitProd(4) = ""
strOpUnitProd(5) = ""
Case 3
strOpUnitProd(1) = ""
strOpUnitProd(2) = ""
strOpUnitProd(3) = ""
strOpUnitProd(4) = ""
strOpUnitProd(5) = ""
Case 4
strOpUnitProd(1) = ""
strOpUnitProd(2) = ""
strOpUnitProd(3) = ""
strOpUnitProd(4) = ""
strOpUnitProd(5) = ""
Case 5
strOpUnitProd(1) = ""
strOpUnitProd(2) = ""
strOpUnitProd(3) = ""
strOpUnitProd(4) = ""
strOpUnitProd(5) = ""
End Select
End Function
*******************************
What am I doing wrong with the following:
*******************************
Private Sub cmdFormat_Click()
Call Selection(fraFormat.ActiveControl.TabIndex)
End Sub
Is there a better way to do this? Thanks for any help.
--
A rolling stone gathers no moss but leaves a trail of busted stuff.
Bookmarks