H o l a:
Este es el código para registrar las asistencias
Private Sub CButton3_Click()
'Por.Dante Amor
If ComboBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = -1 Then Exit Sub
Set h3 = Sheets("REGISTRO DE ASISTENCIA")
Set r = h3.Columns("B")
Set b = r.Find(ComboBox1, lookat:=xlWhole)
If Not b Is Nothing Then
ncell = b.Address
Do
If h3.Cells(b.Row, "A") = Date Then
MsgBox "El cliente ya se registró el día de hoy", vbExclamation
Exit Sub
End If
Set b = r.FindNext(b)
Loop While Not b Is Nothing And b.Address <> ncell
End If
u = h3.Range("A" & Rows.Count).End(xlUp).Row + 1
If IsNumeric(ComboBox1) Then cod = CDbl(ComboBox1) Else cod = ComboBox1
h3.Cells(u, "A") = Date
h3.Cells(u, "B") = cod
h3.Cells(u, "C") = TextBox3
h3.Cells(u, "D") = TextBox4
h3.Cells(u, "E") = TextBox5
h3.Cells(u, "F") = 1
cuantos = Application.CountIf(h3.Columns("B"), ComboBox1)
TextBox10 = cuantos
MsgBox "Asitencia registrada", vbInformation, "REGISTRO DE ASISTENCIA"
End Sub
'
Private Sub ComboBox1_Change()
'Por.Dante Amor
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox9 = ""
TextBox10 = ""
If ComboBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = -1 Then Exit Sub
f = ComboBox1.ListIndex + 2
Set h2 = Sheets("USUARIOS")
Set h3 = Sheets("REGISTRO DE ASISTENCIA")
cuantos = Application.CountIf(h3.Columns("B"), ComboBox1)
TextBox3 = h2.Cells(f, "B")
TextBox4 = h2.Cells(f, "C")
TextBox5 = h2.Cells(f, "I")
TextBox6 = h2.Cells(f, "G")
TextBox7 = h2.Cells(f, "H")
TextBox9 = h2.Cells(f, "K")
TextBox10 = cuantos
End Sub