Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/06/2014, 17:14
omartineznolasco
 
Fecha de Ingreso: junio-2014
Mensajes: 1
Antigüedad: 9 años, 10 meses
Puntos: 0
VBA - Método Find de excel

hola una consulta fijaque yo me hice un formulario para buscar datos pero los datos los tengo en 2 hojas diferentes y solo me busca sobre la hoja que acciono el buscdor VB como hago paraq me busque datos en las dos hojas sin q importe de donde abra el VB las hojas las tengo con el nobre de hoja1 hoja 2
este es el codigo q use
no se q es lo que me hizo flata ahi colocar

Private Sub CommandButton1_Click()
Dim codigo_master, idbusca As String
Dim fila As Integer
fila = 5
codigo_master = TextBox1
Do While idbusca <> codigo_master
fila = fila + 1
idbusca = Range("B" & fila).Value
If idbusca = Empty Then
MsgBox "CODIGO NO ENCONTRADO"
Exit Do
End If
Loop
Dim codigo As String
codigo = Range("B" & fila).Value


TextBox2 = Range("C" & fila).Value
TextBox3 = Range("E" & fila).Value
TextBox4 = Range("D" & fila).Value
TextBox5 = Range("H" & fila).Value
TextBox6 = Range("F" & fila).Value
TextBox7 = Range("G" & fila).Value
TextBox8 = Range("K" & fila).Value
TextBox9 = Range("I" & fila).Value
TextBox10 = Range("J" & fila).Value
TextBox11 = Range("L" & fila).Value
TextBox12 = Range("N" & fila).Value
TextBox13 = Range("O" & fila).Value
TextBox14 = Range("M" & fila).Value
TextBox15 = Range("P" & fila).Value
TextBox1.SetFocus
End Sub