Continuación en Macro de Agenda habilitar horario Extraordinario

Siguiendo con nuestro ejemplo me gustaría que en el formulario de citas pudieras habilitar un horario extraordinario en el cual a pesar de que halla un horarios especifico cada día, si se hace necesario agendar en horas extras se pueda.

1 Respuesta

Respuesta
1

Preparo esa macro y te la envío.

¡Gracias! 

Este es el código

Private Sub CommandButton1_Click()
'Por.Dante Amor
    Set h1 = Sheets("INGRESAR_CITA")
    'Registrar cita
    If CheckBox1 Then
        h1.[D23] = CDate(Format(TextBox1, "HH:MM"))
        h1.[D24] = CDate(Format(TextBox2, "HH:MM"))
        Unload Me
    Else
        'If Label1 = "" Then
        '    MsgBox "Falta el cliente", vbExclamation, "REGISTRAR CITA"
        '    Exit Sub
        'End If
        If Label2 = "" Then
            MsgBox "Falta la fecha", vbExclamation, "REGISTRAR CITA"
            Exit Sub
        End If
        If Label3 = "" Then
            MsgBox "Selecciona un horario", vbExclamation, "REGISTRAR CITA"
            Exit Sub
        End If
        '
        'Set h2 = Sheets("Agenda")
        'u = h2.Range("B" & Rows.Count).End(xlUp).Row + 1
        'h2.Cells(u, "B") = h1.[D22]
        'h2.Cells(u, "C") = CDate(Format(Label3, "HH:MM"))
        'h2.Cells(u, "D") = "=C" & u & "+""00:" & ComboBox1 & """"
        'h2.Cells(u, "D") = h2.Cells(u, "D").Value
        'ActualizarHorarios
        h1.[D23] = CDate(Format(Label3, "HH:MM"))
        h1.[D24] = "=C" & u & "+""00:" & ComboBox1 & """"
        Label3 = ""
        ComboBox1 = ""
        Unload Me
    End If
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas