lunes, 12 de marzo de 2018

formato de prestamos


formulario de ventas vehiculos

<html>
<head><title>venta de vehiculos</title></head>
 <body>
<div align="center">
<table border="1" width="80%" align="center">
<tr align="center">
<td>
<span style="font-family: papyrus; font-size: 3em; color:#9f0025">
Venta de automoviles el buen motor</span><br>
<span style="font-family: luna bar; font-size: 1.5em; color:#ff003c">
Since 2018</span>
</td>
</tr>
<tr>
     <td>
<form action="pro_venta.php" method="post">
<table border="0" width="100%" align="center">
<tr>
<td align="right" colspan="2">
Fecha:
</td>
<td align="left" colspan="3">
<input type="date" name="fecha" required >
</td>
</tr>

<tr>
<td align="right" colspan="2">
Nombre:
</td>
<td align="left" colspan="3">
<input type="name" name="nombre" required >
</td>
</tr>

<tr>
<td align="right" valign="top" colspan="2">
Codigo:
</td>
<td align="left" colspan="3">
<input type="text" name="codigo" required >
</td>
</tr>

<tr bgcolor="#0096ff">
<th>modelo</th>
<th>marca </th>
<th>color </th>
<th>tipo  </th>
<th>precio</th>
</tr>

<tr>
<td><input type="text" name="modelo" required ></td>
<td>
<select name="marca" required>
<option value="">seleccione el modelo</option>
<option value="honda">honda</option>
<option value="porsche">Porsche</option>
<option value="mitsubishi">Mitsubishi</option>
<option value="toyota">Toyota</option>
<option value="chevrolet">Chevrolet</option>
<option value="mazda">Mazda</option>
</select>
</td>

<td>
<select name="color" required >
<option value="">seleccione el color</option>
<option value="rojo">rojo</option>
<option value="gris">gris</option>
<option value="azul">azul</option>
<option value="negro">negro</option>
<option value="amarillo">amarillo</option>
<option value="verde">verde</option>
</select>
</td>

<td>
<select name="tipo" required >
<option value="">seleccione el tipo</option>
<option value="4*4">4*4</option>
<option value="micro-bus">Micro-bus</option>
<option value="deportivo">Deportivo</option>
<option value="tuning">Tuning</option>
</select>
</td>

<td><input type="text" name="precio" required ></td>
</tr>

<tr align="center">
<td colspan="5"><input type="submit" value="concluir venta"></td>
</tr>


</table>
</form>
</td>
</tr>
</table>
</div>
 </body>
</html>

FORMULARIO HORIZONTAL

<html>
<head>
<title>formulario</title>
<meta charset="utf-8">
<style>

</style>
</head>
<body>
<form action="guardar.php" method="post">
<table border="1" align="center" width="600">
<tr>
<td colspan="4" align="center">
INSCRIPCIONES</td>
</tr>
<tr>
<td>NOMBRE</td>
<td>CARRERA</td>
<td>GRADO</td>
<td>FECHA</td>
</tr>
<tr>
<td><input type="text" name="nombre"></input></td>
<td><select type="text" name="carrera">
<option>BACO</option>
<option>PAE</option>
<option>MERCA</option>
<option>BAD</option>
<option>PCC</option>
</select>
</td>
<td>
<select type="text" name="grado">
<option>4TO</option>
<option>5TO</option>
<option>6TO</option>
</select>
</td>
<td>
<input type="date" name="fecha"></input>
</td>
</tr>
<tr>
<td colspan="4" align="center">
<button type="submit" value="enviar">REGISTRAR</button>
</td>
</tr>
</form>
</body>
</html>

jueves, 16 de marzo de 2017

SI ANIDADOS EN EXCEL

=SI(Y(C3>=5,D3>=5,E3<=10),"SI APROBADO","NO APROBADO")



=SI(C6=$F$4,$H$4,SI(C6=$F$5,$H$5,SI(C6=$F$6,$H$6)))

lo gin en vba excel

1. creamos botón en excel
Sub Botón1_Haga_clic_en()
UserForm1.Show

End Sub 'esto es para llamar al formulario'



____________________________________________
Private Sub CommandButton1_Click()
If TextBox2.Text = "heber" And TextBox1.Text = "1234" Then
MsgBox "Bienvenido Heber"
Load menu 'LLAMO A LA SIGUIENTE VENTANA'
Unload UserForm1 'OCULTO LA VENTANA A NO VISUALIZAR'
menu.Show 'ACTIVO A LA VENTANA SIGUIENTA A TRABAJAR'
Else
MsgBox "datos incorrectos"
TextBox1.Text = ""
TextBox2.Text = ""
End If

End Sub
_________________________________________________________________________________
en el botón guardar necesitamos este código

Private Sub CommandButton2_Click()
registro
Sheets("datos").Select
ult = Cells(Rows.Count, 1).End(xlUp).Row
Cells(ult + 1, 1) = TextBox1.Text
Cells(ult + 1, 2) = TextBox2.Text
Cells(ult + 1, 3) = TextBox3.Text
Cells(ult + 1, 4) = TextBox4.Text
Cells(ult + 1, 5) = TextBox5.Text
Cells(ult + 1, 6) = TextBox6.Text

End Sub
___________________________________________________________
con el modulo trabajamos lo siguiente
Sub registro()
IDPRODUCTO = UserForm1.TextBox1.Text
CATEGORIA = UserForm1.TextBox2.Text
PRODUCTO = UserForm1.TextBox3.Text
CANTIDAD_INGRESADA = UserForm1.TextBox4.Text
PRECIO_UNIT = Val(UserForm1.TextBox5.Text)
Total = Val(UserForm1.TextBox6.Text)

End Sub
___________________________________________ y listo a guardar datos...
________________________________________________________________________________________________________________________________________________________________
CONSULTAR 

Private Sub ComboBox1_Change()
Sheets("Hoja1").Activate
Cells(ComboBox1.ListIndex + 2, 1).Select 'carga el listado tomando en cuenta fila 2 y columna 1 como base'
TextBox1.Text = ActiveCell.Offset(0, 1) 'Avanza una columna (derecha)'
TextBox2.Text = ActiveCell.Offset(0, 2) 'Avanza dos columna (derecha)'
TextBox3.Text = ActiveCell.Offset(0, 3) 'Avanza tres columna (derecha)'
End Sub
Private Sub ComboBox1_Enter()
Cargardatos
End Sub
Sub Cargardatos()
ComboBox1.Clear
Sheets("Hoja1").Select
Range("A2").Select
Do While Not IsEmpty(ActiveCell) ' es un bucle Hacer mientras se cumpla la condición.'
ComboBox1.AddItem ActiveCell.Value
ActiveCell.Offset(1, 0).Select 'Avanza una fila (abajo)'
Loop
End Sub