Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - busqueda

#1
Foro Libre / Macros VBA
24 Octubre 2017, 20:41 PM
Buenas tardes.

tengo un problema con mi macros al ejecutar el boton guardar de la macro par registro en tabla de excel. esta informacion si se adiere, el problema es que se ingresa hasta la ultima fila del registro de excel en la celda A65535

este es el comando, si alguien pudiera ayudarme!!!



Private Sub CommandButton1_Click()
Sheets("proveedores").Select Range("A2").Select
If TextBox2 = "" Or TextBox3 = "" Or TextBox5 = "" Or TextBox15 = "" Or TextBox16 = "" Or TextBox17 = "" Or TextBox18 = "" Or TextBox19 = "" Then
MsgBox "Está dejando campos requeridos vacios favor complete", vbExclamation, "Almacen"
TextBox3.SetFocus
Else
Range("A" & Cells.Rows.Count).End(xlUp).Offset(1).Select
ActiveCell = TextBox2.Value
ActiveCell.Offset(0, 1) = TextBox3.Value
ActiveCell.Offset(0, 2) = TextBox5.Value
ActiveCell.Offset(0, 3) = TextBox15.Value
ActiveCell.Offset(0, 4) = TextBox7.Value
ActiveCell.Offset(0, 5) = TextBox13.Value
ActiveCell.Offset(0, 6) = TextBox14.Value
ActiveCell.Offset(0, 7) = TextBox16.Value
ActiveCell.Offset(0, 8) = TextBox17.Value
ActiveCell.Offset(0, 9) = TextBox18.Value
ActiveCell.Offset(0, 10) = TextBox19.Value
MsgBox "Empleado ingresado exitosamente", vbInformation, "Servitap"
TextBox2 = ""
TextBox3 = ""
TextBox5 = ""
TextBox15 = ""
TextBox7 = ""
TextBox13 = ""
TextBox14 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""
TextBox2.SetFocus
End If
End Sub
#2
PHP / php y mysql
5 Octubre 2017, 19:54 PM
tengo un error alguien me pudiera ayudar de faor

Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\prueba\registro.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\prueba\registro.php on line 16

este es el codigo

Código (php) [Seleccionar]
<?php
$db_host
="localhost";
$db_user="root";
$db_password="";
$db_name="prueba";
$db_table_name="datos";
$db_connection mysqli_connect($db_host$db_user$db_password);

if (!
$db_connection) {
die('No se ha podido conectar a la base de datos'.mysqli_error());
}
$subs_name utf8_decode($_POST['nombre']);
$subs_last utf8_decode($_POST['apellido']);
$subs_email utf8_decode($_POST['email']);

$resultado mysql_query("SELECT * FROM ".$db_table_name." WHERE Email = '".$subs_email."'"$db_connection);


if (
mysql_num_rows($resultado)>0)
{

header('Location: Fail.html');

} else {

$insert_value 'INSERT INTO `' $db_name '`.`'.$db_table_name.'` (`Nombre` , `Apellido` , `Email`) VALUES ("' $subs_name '", "' $subs_last '", "' $subs_email '")';

mysql_select_db($db_name$db_connection);
$retry_value mysql_query($insert_value$db_connection);

if (!
$retry_value) {
   die(
'Error: ' mysql_error());
}

header('Location: Success.html');

}

mysql_close($db_connection);


?>


MOD: Etiqueta GeSHi.