Calendario userform no guarda datos en el texbox
Descargué un Userform de un calendario para agregar datos a mis formularios, logro que se muestre, pero al seleccionar la fecha, éstas no se guardan en los textbox
Estos son mis sub:
Qué está mal
En el formulario del calendario Private Sub MonthView1_DateClick(ByVal DateClicked As Date) ' ' Controla que no se utilicen fechas en el futuro ' If DateClicked > Date And val_cal <> "FecCompromiso" And val_cal <> "FecReplanificacion" And val_cal <> "FecReunion" Then ' MsgBox "La fecha no puede ser mayor a hoy." ' Exit Sub ' End If If val_cal = "FecPlanificada" Then Agrega.TextBoxFechaVisita.Value = Format(DateClicked, "yyyy-mm-dd") If val_cal = "FecReal" Then GestionVisitas.TB_FechaReal.Value = Format(DateClicked, "yyyy-mm-dd") Unload Me End Sub en cda uno de los botones que active el calendario Formulario Agrega: Private Sub CmBFecha1_Click() CALENDARIO.MonthView1 = Now() val_cal = "FecPlanificada" CALENDARIO.Show End Sub formulario Gestion Private Sub CommandButton1_Click() CALENDARIO.MonthView1 = Now() val_cal = "FecReal" CALENDARIO.Show End Sub
1 respuesta
Respuesta de Abraham Valencia
1