Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Este tema está ahora archivado y está cerrado a más respuestas.
Tengo el siguiente problema, en el paso de validación de un formulario, tengo que validar 3 o 4 campos por linea, las lineas pueden llegar a ser 20.
Es por eso que quisiera poder mediante un FOR a cada uno de los textbox/combobox. Intente algo asi pero no funciona, se que no lo estoy haciendo correctamente. Lei algo acerca de indexar pero tampoco se realizarlo, podrian indicarme por donde atacar el problema. Muchas gracias.
VALIDACIÓN PARA LA PRIMER LINEA:
If Npedidobox1.Value = "" Then MsgBox "Por favor seleccione Numero de Pedido en la linea 1.", vbExclamation, "Carga de Movimiento" Exit Sub End If If Conceptobox1.Value = "" Then MsgBox "Por favor seleccione Concepto en la linea 1.", vbExclamation, "Carga de Movimiento" Exit Sub End If If Not IsNumeric(Montobox1.Value) Then MsgBox "Por favor, ingrese un monto válido en la linea 1.", vbExclamation, "Carga de Movimiento" Exit Sub End IfVALIDACIÓN GENERALIZADA (NO FUNCIONA):
For i = 1 To NumeroLineasBox If ("npedidobox" & i & ".value") = "" Then MsgBox "Por favor seleccione Numero de Pedido en la linea " & i & ".", vbExclamation, "Carga de Movimiento" Exit Sub End If If ("Conceptobox" & i & ".value") = "" Then MsgBox "Por favor seleccione Concepto en la linea " & i & ".", vbExclamation, "Carga de Movimiento" Exit Sub End If If Not IsNumeric("Montobox" & i & ".Value") Then MsgBox "Por favor, ingrese un monto válido en la linea " & i & ".", vbExclamation, "Carga de Movimiento" Exit Sub End If NextMuchas gracias.