Claro, me funcionó el siguiente código.
Option Explicit
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim encontrado As Boolean
Dim contador As Integer
Dim resultadosHoja(10000) As String
Dim resultadosValue(10000, 10) As String
Dim total As Integer
Dim rngfnd As Range
Dim primerres As String
Dim fila(10000) As String
Private Sub Buscarr_Click()
'BOTON Buscar'
Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Open(PRINCIPAL.CommonDialog1.FileName)
If Text1.Text = "" Then
MsgBox "Ingrese un valor a buscar"
Else
contador = 1
total = 0
Dim txtSearch As String
encontrado = False
txtSearch = Text1
For Each ws In wb.Worksheets
On Error Resume Next
Set rngfnd = ws.UsedRange.Find(What:=txtSearch, After:=ws.UsedRange.Cells(ws.UsedRange.Cells.Count), LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
On Error Resume Next
primerres = rngfnd.Address
If primerres <> "" Then
Do
If Not rngfnd Is Nothing Then
encontrado = True
resultadosHoja(contador) = ws.Name
resultadosValue(contador, 1) = rngfnd.Worksheet.Cells(rngfnd.Row, 1).Value
resultadosValue(contador, 2) = rngfnd.Worksheet.Cells(rngfnd.Row, 2).Value
resultadosValue(contador, 3) = rngfnd.Worksheet.Cells(rngfnd.Row, 3).Value
resultadosValue(contador, 4) = rngfnd.Worksheet.Cells(rngfnd.Row, 4).Value
resultadosValue(contador, 5) = rngfnd.Worksheet.Cells(rngfnd.Row, 5).Value
resultadosValue(contador, 6) = rngfnd.Worksheet.Cells(rngfnd.Row, 6).Value
resultadosValue(contador, 7) = rngfnd.Worksheet.Cells(rngfnd.Row, 7).Value
resultadosValue(contador, 8) = rngfnd.Worksheet.Cells(rngfnd.Row, 8).Value
resultadosValue(contador, 9) = rngfnd.Worksheet.Cells(rngfnd.Row, 9).Value
resultadosValue(contador, 10) = rngfnd.Worksheet.Cells(rngfnd.Row, 10).Value
fila(contador) = rngfnd.Row
contador = contador + 1
Set rngfnd = ws.UsedRange.FindNext(After:=rngfnd)
End If
Loop While rngfnd.Address <> primerres
End If
Next ws
total = contador - 1
If encontrado = False Then
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
rescam.Text = ""
resfij.Text = ""
Siguiente.Enabled = False
Editar.Enabled = False
Anterior.Enabled = False
Label15.Visible = False
Imprimirr.Enabled = False
Guardar.Enabled = False
MsgBox "Texto no encontrado en el archivo Excel"
Else
contador = 1
Text2.Text = resultadosHoja(contador)
Text3.Text = resultadosValue(contador, 1)
Text4.Text = resultadosValue(contador, 2)
Text5.Text = resultadosValue(contador, 3)
Text6.Text = resultadosValue(contador, 4)
Text7.Text = resultadosValue(contador, 5)
Text8.Text = resultadosValue(contador, 6)
Text9.Text = resultadosValue(contador, 7)
Text10.Text = resultadosValue(contador, 8)
Text11.Text = resultadosValue(contador, 9)
Text12.Text = resultadosValue(contador, 10)
resfij = total
rescam = contador
Label15.Visible = True
Siguiente.Enabled = True
Editar.Enabled = True
Anterior.Enabled = True
Imprimirr.Enabled = True
End If
End If
xlApp.Workbooks.Close
xlApp.Quit
Application.Quit
xlApp.Parent.Quit
End Sub
Private Sub Siguiente_Click()
'BOTON Siguiente'
contador = contador + 1
If contador > total Then
contador = 1
End If
If contador <= total Then
Text2.Text = resultadosHoja(contador)
Text3.Text = resultadosValue(contador, 1)
Text4.Text = resultadosValue(contador, 2)
Text5.Text = resultadosValue(contador, 3)
Text6.Text = resultadosValue(contador, 4)
Text7.Text = resultadosValue(contador, 5)
Text8.Text = resultadosValue(contador, 6)
Text9.Text = resultadosValue(contador, 7)
Text10.Text = resultadosValue(contador, 8)
Text11.Text = resultadosValue(contador, 9)
Text12.Text = resultadosValue(contador, 10)
End If
rescam = contador
resfij = total
End Sub
Private Sub Anterior_Click()
'BOTON Anterior'
contador = contador - 1
If contador < 1 Then
contador = total
End If
If contador >= 1 Then
Text2.Text = resultadosHoja(contador)
Text3.Text = resultadosValue(contador, 1)
Text4.Text = resultadosValue(contador, 2)
Text5.Text = resultadosValue(contador, 3)
Text6.Text = resultadosValue(contador, 4)
Text7.Text = resultadosValue(contador, 5)
Text8.Text = resultadosValue(contador, 6)
Text9.Text = resultadosValue(contador, 7)
Text10.Text = resultadosValue(contador, 8)
Text11.Text = resultadosValue(contador, 9)
Text12.Text = resultadosValue(contador, 10)
End If
rescam = contador
resfij = total
End Sub
Lo puse con las modificaciones que necesitaba según mi formulario, pero en sí ahí esta todo el código. Guarde los resultados en una matriz y me fue más fácil poder mostrarlos y cambiar de uno a otro.
De nuevo, muchas gracias por su ayuda.