elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Mensajes
Páginas: [1]
1  Foros Generales / Foro Libre / Macros VBA en: 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  Programación / PHP / php y mysql en: 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
  1. <?php
  2. $db_host="localhost";
  3. $db_user="root";
  4. $db_password="";
  5. $db_name="prueba";
  6. $db_table_name="datos";
  7. $db_connection = mysqli_connect($db_host, $db_user, $db_password);
  8.  
  9. if (!$db_connection) {
  10. die('No se ha podido conectar a la base de datos'.mysqli_error());
  11. }
  12. $subs_name = utf8_decode($_POST['nombre']);
  13. $subs_last = utf8_decode($_POST['apellido']);
  14. $subs_email = utf8_decode($_POST['email']);
  15.  
  16. $resultado = mysql_query("SELECT * FROM ".$db_table_name." WHERE Email = '".$subs_email."'", $db_connection);
  17.  
  18.  
  19. if (mysql_num_rows($resultado)>0)
  20. {
  21.  
  22. header('Location: Fail.html');
  23.  
  24. } else {
  25.  
  26. $insert_value = 'INSERT INTO `' . $db_name . '`.`'.$db_table_name.'` (`Nombre` , `Apellido` , `Email`) VALUES ("' . $subs_name . '", "' . $subs_last . '", "' . $subs_email . '")';
  27.  
  28. mysql_select_db($db_name, $db_connection);
  29. $retry_value = mysql_query($insert_value, $db_connection);
  30.  
  31. if (!$retry_value) {
  32.   die('Error: ' . mysql_error());
  33. }
  34.  
  35. header('Location: Success.html');
  36.  
  37. }
  38.  
  39. mysql_close($db_connection);
  40.  
  41.  
  42. ?>

MOD: Etiqueta GeSHi.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines