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.

Condiciones para Valor ingresado en Textbox

publicado

Buenos días,

Amigos del foro quisiera solicitarles una pequeña ayuda, estoy intentado crear 3 condiciones en un botón de un formulario con el cual pretendo ó busco:

1. No se permita registrar en vacío un textbox.

2. Se evalue el formato si el valor ingresado en el textbox1 se encuentra en formato fecha.

3. Si el valor ingresado en textbox1 es mayor a la fecha determinada no permita el registro.

4. Se¿i el valor del texbox1 es menor a la fecha determinada cargar el valor en la celda indicada.

El formulario cuenta con 3 textboxs y 3 botones para ejecutar las 4 acciones (mencionadas arriba), agradezco la ayuda y/o correcciones que me puedan brindar.

Dim Conttrol As Control
For Each Conttrol In Controls
If TypeOf Conttrol Is TextBox Then
    If Conttrol.Text = "" Then
        MsgBox "El valor no puede estar vacio", vbCritical, "Smart Intelligence Tools"
        Exit Sub
    End If

End If
TextBox2.SetFocus
Next
If TextBox2.Value <> "20221108-99-LA-JB-30401" Then
MsgBox "El valor de la llave Keyserial no es válido ", vbCritical, "Smart Intelligence Tools"
End If
Exit Sub

If TextBox2.Value = "20221108-99-LA-JB-30401" Then
End If
Range("B1").Value = TextBox2.Text

Saludos

JB

userform show según valor de una celda4.xlsm

Featured Replies

publicado
  • Autor

@JasallBcn primeramente agradecerte el tiempo brindado para aportar la solución. Revisando me parece se presenta problemas al momento de intentar validar una fecha correcta  y presionar el botón para realizar el registro del textbox en la celda, podrías por favor revisar si te sucede lo mismo.

Quedo atento a los comentarios.

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.