Hey i've got bunch of arrays of tick boxes, each array contains somewhere
between 5 and 20.
What I want to do is write a function that returns the captions of every
ticked tick box in an array as a string.
I want to be able to pass to the function the array name, and the lower and
upper limits of the array. But I have no idea how to pass the control name
(array name).
I can do it by writing a prodecure for every single array, but there are
hundreds of them! It must be possible using a single function or procedure.
I came up with this, it needs finishing.
Private Function ReturnString(ctrlName As ***WHAT?????**** , intLow As
Integer, intHigh As Integer) As String
intFlag = 0
strField = ""
For intCount = intLow To intHigh
If ctrlName(intCount).Value = 1 Then
If intFlag = 0 Then
strField = ctrlName(intCount).Caption
intFlag = 1
Else
strField = strField & ", " & ctrlName(intCount).Caption
End If
End If
Next intCount
ReturnString = strField
End Function
Thanks for any help
Steve