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.

Ingresar datos con do loop while

publicado

Macro se llama: Registro.

Solicitar a través de un inputBox el ingreso de los registros de la Tabla hasta que el usuario decida no ingresar más registros. Usar estructura While...Wend.

El disparador permite Repetir todas las instrucciones hasta que usuario desea no ingresar más datos, hasta que respuesta sea: No → Disparador toma el valor de 0

y sale del ciclo repetitivo While

Módulo 1:

Sub Registro()
disparador = 1
While disparador = 1
[A1048576].End(xlUp).Activate
Fila = ActiveCell.Row + 1
Nombre = InputBox("Ingrese el nombre:")
País = InputBox("Ingrese el País de origen " & Nombre)
Ciudad = InputBox("Ingrese la Ciudad de procedencia " & Nombre)
Teléfono = InputBox("Ingrese el Teléfono " & Nombre)
Dirección = InputBox("Ingrese la Dirección " & Nombre)
Cells(Fila, 1) = Nombre
Cells(Fila, 2) = País
Cells(Fila, 3) = Ciudad
Cells(Fila, 4) = Teléfono
Cells(Fila, 5) = Dirección
'Decisión sobre ingresar nuevos datos
Mensaje = "Desea ingresar nuevos datos?"
Estilo = vbYesNo + vbQuestion + vbDefaultButton2
Respuesta = MsgBox(Mensaje, Estilo)
If Respuesta = vbYes Then
disparador = 1
Else
disparador = 0
End If
Wend
End Sub

Editado por moderación para insertar etiquetas al código...

Ingresar datos con Do Loop While.rar

Featured Replies

No hay posts para mostrar

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.