Tema: Excel y Vba
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/09/2011, 08:20
alexg88
 
Fecha de Ingreso: abril-2011
Mensajes: 1.342
Antigüedad: 13 años
Puntos: 344
Respuesta: Excel y Vba

No dices donde te da el error, pero supongo que será en esta linea:

Código vb:
Ver original
  1. Cells.Find(What:=cadena, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  2. xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  3. , SearchFormat:=False).Activate

tienes que poner:

Código vb:
Ver original
  1. Set RangeObj = Cells.Find(What:=cadena, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  2. xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  3. , SearchFormat:=False)
  4.  
  5. If RangeObj Is Nothing Then MsgBox "Not Found" Else RangeObj.Activate