Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ayuda

publicado

Buenas tardes comunidad, necesito ayuda con un trabajo en Excel con visual Basic, tengo un formulario con un listbox que muestra los datos que están dentro de una tabla en una hoja de excel y también un texbox que se llena mediante un pequeño calendario, la ayuda que necesito es que cuando se llene el texbox con una fecha el listbox muestre todos los registros de esa fecha

Featured Replies

publicado
  • Autor

no me permite subir el archivo es un poco mas pesado de lo permitido

 

publicado

Elimina las partes innecesarias del archivo y súbelo 

publicado
  • Autor

Este es el codigo del visual basic, esper puedas ayudarme porfavor

' Para mostrar el calendario y llenar el texbox al seleccionr una fecha en el calendario
Private Sub btnFecha_Click()
Dim fecha As Date
fecha = CalendarForm.GetDate
txtFecha.value = fecha
End Sub


Private Sub listDocentes_Click()

End Sub

Private Sub ListTabla_Click()

End Sub

' Para mostrar todos los registros en el listbox
Private Sub optTodos_Click()
    Me.ListTabla.RowSource = "General"
    Me.ListTabla.ColumnCount = 6
    Me.ListTabla.ColumnWidths = "100;190;200;90;150;100"
    Me.ListTabla.ColumnHeads = False

End Sub

' Función para ordenar los elementos del ListBox por fecha y hora de manera descendente
Private Sub SortListBoxByDateDescending(lst As MSForms.ListBox)
    Dim i As Long, j As Long
    Dim temp As Variant
    
    For i = 0 To lst.ListTabla - 2
        For j = i + 1 To lst.ListTabla - 1
            If DateValue(lst.List(j, 3)) + TimeValue(lst.List(j, 4)) > DateValue(lst.List(i, 3)) + TimeValue(lst.List(i, 4)) Then
                ' Intercambia los elementos en la lista
                For k = 0 To lst.ColumnCount - 1
                    temp = lst.List(i, k)
                    lst.List(i, k) = lst.List(j, k)
                    lst.List(j, k) = temp
                Next k
            End If
        Next j
    Next i
End Sub


'

Private Sub txtFecha_Change()

End Sub
' Para bloquear la edicion del texbox

Private Sub UserForm_Initialize()

Me.txtFecha.Locked = True

Me.txtFecha.ForeColor = RGB(0, 0, 0) ' Color negro

optTodos.value = True

btnFecha.SetFocus


End Sub
 

publicado
  • Autor

ayuda porfavor

 

publicado
  • Autor

esta bien muchas gracias

 

publicado
Private Sub txtFecha_Change()

    With Hoja3.Range("A1").CurrentRegion
        uf = .Range("A" & Rows.Count).End(xlUp).Row
        .Columns("E:E").NumberFormat = "m/d/yyyy"
        .AutoFilter 5, txtFecha.Value
        Hoja1.Range("A1").CurrentRegion.Delete
        .SpecialCells(12).Copy Hoja1.Range("A1")
        ListTabla.RowSource = Hoja1.Range("A1"). _
        CurrentRegion.Offset(1).Address(, , , 1)
        .AutoFilter
        .Columns("E:E").NumberFormat = "m/d/yyyy h:mm"
    End With
    
End Sub

 

Registro de Entradas y Salidas - copia.xlsm

publicado
  • Autor

muchas gracias🤗

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.