YA QUE NO ME AYUDARON!! YO SOLO ENCONTRE LA SOLUCION!!!! JAJJA
Lo dejo por si a alguno le interesa
este es el code completo del proyecto subido!!!
Option Explicit
Option Base 1
Dim ValorPatron As Byte
Dim tablas() As String
Private Sub Command2_Click()
End Sub
Private Sub Form_Load()
Dim n As Byte
For n = 1 To chTablero.UBound
Me.chTablero(n).Caption = n
Next
'DIBUJO UN PATRON
chPatron(1).Value = 1
chPatron(5).Value = 1
chPatron(9).Value = 1
Call CargarTAblas
End Sub
Private Sub chTablero_Click(Index As Integer)
If chTablero(Index).Value Then
chTablero(Index).BackColor = 255
Else
chTablero(Index).BackColor = &H8000000F
End If
End Sub
Private Sub Command1_Click()
List1.Clear
ControlTablas
End Sub
Private Sub CargarTAblas()
ReDim tablas(1 To 3)
tablas(1) = "01/02/03/07/08/09/12/13/14"
tablas(2) = "01/06/07/18/19/20/27/21/30"
tablas(3) = "03/05/08/17/13/14/24/26/28"
End Sub
Private Sub ControlTablas()
Dim n As Byte
Dim t As Byte
Dim tabla As String
Dim mat() As String
For t = 1 To UBound(tablas)
mat = Split(tablas(t), "/")
For n = 0 To UBound(mat())
If chTablero(mat(n)).Value Then
tabla = tabla & "1"
Else
tabla = tabla & "0"
End If
Next n
If ComparaBitPatron(tabla) Then
List1.AddItem "tabla " & t & " -- " & tabla
End If
tabla = ""
Next
Label4 = tabla
End Sub
Private Function ComparaBitPatron(P1 As String) As Boolean
Dim mat() As String
Dim n As Byte
For n = 1 To chPatron.UBound
If chPatron(n).Value Then
If Mid(P1, n, 1) <> "1" Then Exit Function
End If
Next
ComparaBitPatron = True
End Function
Private Sub chPatron_Click(Index As Integer)
Dim tmpID As String
Dim c As Byte
If chPatron(Index).Value Then
chPatron(Index).BackColor = 8421504
Else
chPatron(Index).BackColor = &H8000000F
End If
ValorPatron = 0
For c = 1 To chPatron.UBound
If chPatron(c).Value Then
ValorPatron = ValorPatron + 1
tmpID = tmpID & "1"
Else
tmpID = tmpID & "0"
End If
Next
Me.lbValorPatron = ValorPatron
lbId = tmpID
End Sub