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.

Error al buscar hora en texbox

publicado

Hola a todos.

Mis saludos a este foro que me saco de unos cuantos apuros!!!

Solicito su ayuda en la solucion a este problema, ya que no lo encontre en ningun lado.

En este archivo se muestra un formulario de busqueda, donde busco una fecha de una db y en esa fecha hay horas.

Cuando trato de buscar una hora para que me traiga datos al formulario, no me reconoce la hora por mas que cambie de formato.

En cambio si remplazo el formato hora o pongo numeros enteros al buscarlo me funciona perfecto.

Gracias por su tiempo y ayuda.

buscar hora.zip

Featured Replies

publicado

Hola:

Sustituye el procedimiento:

Private Sub cmdhora_Click()

If txthora.Text = "" Then MsgBox ("Ingrese una hora"): Exit Sub

For i = 2 To Sheets("db_peso_10_paq").Range("A" & Rows.Count).End(xlUp).Row 'Última fila con datos

If txthora.Text =[COLOR=#0000ff] [B]Format([/B][/COLOR]Sheets("db_peso_10_paq").Cells(i, 3).Value,[B] [COLOR=#0000ff]"h:mm")[/COLOR][/B] Then
txtcontrol.Text = Sheets("db_peso_10_paq").Cells(i, 2).Value
Exit Sub
End If

Next

MsgBox ("No se encuentra la hora")

End Sub[/CODE]

En el TextBox has de entrar la hora exactamente igual a como se ve en la celda.

Saludos

publicado
  • Autor

Funciono perfecto!!!

Me falta mucho por aprender y agradezco que haya gente como ustedes dispuestos a enseñar todo lo que saben.

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.