
06/07/2004, 07:28
|
 | | | Fecha de Ingreso: junio-2003 Ubicación: Barcelona y alrededores, España
Mensajes: 877
Antigüedad: 21 años, 8 meses Puntos: 2 | |
Bueno, esta función pone todos los checkboxes en enabled, pero te sirve de ejemplo, para recorrerlos:
Dim contador As Integer
For contador = Me.chkPantalla.LBound To Me.chkPantalla.UBound
Me.chkPantalla.Item(contador).Enabled = (Me.optProducto.Item(0).Value)
Me.chkTeclado.Item(contador).Enabled = (Me.optProducto.Item(1).Value)
Me.chkRaton.Item(contador).Enabled = (Me.optProducto.Item(2).Value)
Next contador
End Sub
--------------------------------------------------------------------------------
Private Function valorBoton() As Boolean
Dim c As Control
Dim testigo As Integer
For Each c In Controls
If c.Name Like "chk*" Then
If c.Value = vbChecked Then
testigo = testigo + 1
End If
End If
Next c
If testigo > 0 Then
valorBoton = True
Else
valorBoton = False
End If
End Function
bichomen
__________________ "Se sabe con exactitud, con cuanta imprecisión, se sabe algo"
Linux Registered User #320332 |