¿Cómo puedo hacer que los datos de un formulario se ingresen solo en una sheet especifica en excel?
Había preguntado y me dijeron que tenia que cambiar el siguiente código
Private Sub INGRE_BTN_Click() ActiveSheet.Cells(5, 3).Select Selection.EntireRow.Insert ActiveSheet.Cells(5, 3) = TextBox1 ActiveSheet.Cells(5, 4) = TextBox2 ActiveSheet.Cells(5, 5) = TextBox3 ActiveSheet.Cells(5, 6) = TextBox4 ActiveSheet.Cells(5, 7) = TextBox5 ActiveSheet.Cells(5, 8) = TextBox6 ActiveSheet.Cells(5, 9) = TextBox7 ActiveSheet.Cells(5, 10) = TextBox8 ActiveSheet.Cells(5, 11) = TextBox9 TextBox1 = Empty TextBox2 = Empty TextBox3 = Empty TextBox4 = Empty TextBox5 = Empty TextBox6 = Empty TextBox7 = Empty TextBox8 = Empty TextBox9 = Empty TextBox1.SetFocus end sub
Por este otro
Private Sub INGRE_BTN_Click()
Sheets("TABLA DE DATOS").Cells(5, 3).Select
Selection.EntireRow.Insert
Sheets("TABLA DE DATOS").Cells(5, 3) = TextBox1
Sheets("TABLA DE DATOS").Cells(5, 4) = TextBox2
Sheets("TABLA DE DATOS").Cells(5, 5) = TextBox3
Sheets("TABLA DE DATOS").Cells(5, 6) = TextBox4
Sheets("TABLA DE DATOS").Cells(5, 7) = TextBox5
Sheets("TABLA DE DATOS").Cells(5, 8) = TextBox6
Sheets("TABLA DE DATOS").Cells(5, 9) = TextBox7
Sheets("TABLA DE DATOS").Cells(5, 10) = TextBox8
Sheets("TABLA DE DATOS").Cells(5, 11) = TextBox9
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox9 = Empty
TextBox1.SetFocus
End SubTABLA DE DATOS es el nombre de la hoja en la cual yo necesito que queden los datos ingresados, pero al final del arreglo me pide depurar el código y no se en que estoy fallando, necesito solucionar esto urgente, alguna idea?
1 Respuesta
Respuesta de Elsa Matilde
1