Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/11/2004, 12:03
Avatar de dn-z
dn-z
 
Fecha de Ingreso: febrero-2003
Ubicación: chile
Mensajes: 185
Antigüedad: 22 años, 2 meses
Puntos: 0
visual basic no me busca lo que quiero !!!

hola

estoy trabajando en excel e hice un pequeño programa sencillo para INSERTAR, CONSULTAR Y BORRAR datos, la idea del boton CONSULTAR es poner el RUT y aparecen los demas datos, pero lo que yo quiero es que poniendo cualquier alternativa como NOMBRE, APELLIDO, etc. tambien me los busque.

ej: si pongo en NOMBRE: "foros del web" y le doy CONSULTAR no me aparece nada, pero si pongo el RUT ahi me salen los datos de "foros del web".

"PLATAFORMA"

que tengo que ponerle para que me haga lo que yo quiero?.....ESTOS SON LOS CODIGOS:


BOTON INSERTAR
-----------------------------------------
Private Sub CommandButton1_Click()
Range("A10").Select
Selection.EntireRow.Insert
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox1.SetFocus
End Sub
-----------------------------
BOTON CONSULTAR
-------------------------------------------------------------------
Private Sub CommandButton2_Click()
Cells.Find(What:=TextBox1, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ActiveCell.Offset(0, 1).Select
TextBox2 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox3 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox4 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox5 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox6 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox7 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox8 = ActiveCell
End Sub
------------------------------
BOTON BORRAR
-------------------------------------
Private Sub CommandButton3_Click()
Selection.EntireRow.Delete
Range("A10").Select
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox1.SetFocus
End Sub
--------------------------------------
R.U.T
--------------------------------------
Private Sub TextBox1_Change()
Range("A10").FormulaR1C1 = TextBox1
Range("A10").Select
ActiveCell.FormulaR1C1 = TextBox1
End Sub
--------------------------------------
APELLIDO
--------------------------------------
Private Sub TextBox2_Change()
Range("B10").FormulaR1C1 = TextBox2
End Sub
-------------------------------------
NOMBRE
--------------------------------------
Private Sub TextBox3_Change()
Range("C10").FormulaR1C1 = TextBox3
End Sub
---------------------------------------
EMPRESA para abajo sigue en orden
---------------------------------------
Private Sub TextBox4_Change()
Range("D10").FormulaR1C1 = TextBox4
End Sub
---------------------------------------
Private Sub TextBox5_Change()
Range("E10").FormulaR1C1 = TextBox5
End Sub
---------------------------------------
Private Sub TextBox6_Change()
Range("F10").FormulaR1C1 = TextBox6
End Sub
---------------------------------------
Private Sub TextBox7_Change()
Range("G10").FormulaR1C1 = TextBox7
End Sub
----------------------------------------
Private Sub TextBox8_Change()
Range("H10").FormulaR1C1 = TextBox8
End Sub


MUCHAS GRACIAS
__________________
ECHALE PIMIENTA!!!