Definir rango para Macro Buscar
Que tal :)
Quiero definir un rango de búsqueda ( la columna H) para mi buscador
Puedes echarme una mano por favor
Dim rng As Range
Dim SearchRange As Range
Dim strAddress As String, strFind As String
'Beginn
strFind = InputBox("Bitte Suchbegriff eingeben:", Application.UserName, strSuch)
If strFind = "" Then Exit Sub
Set SearchRange = ThisWorkbook.Worksheets(1).Range("H:H")
Set rng = Cells.Find(strFind, lookat:=xlPart, LookIn:=xlFormulas)
On Error GoTo 0
If Not rng Is Nothing Then
strAddress = rng.Address
Do
Application.Goto rng, False
If MsgBox("Weiter", vbYesNo + vbQuestion) = vbNo Then Exit Sub
Set rng = Cells.FindNext(After:=ActiveCell)
If rng.Address = strAddress Then Exit Do
Loop
End If
strSuch = strFind
MsgBox "Keine weiteren Fundstellen!", False, Application.UserName
Worksheets(1).Activate
Range("A1").Select
Quiero definir un rango de búsqueda ( la columna H) para mi buscador
Puedes echarme una mano por favor
Dim rng As Range
Dim SearchRange As Range
Dim strAddress As String, strFind As String
'Beginn
strFind = InputBox("Bitte Suchbegriff eingeben:", Application.UserName, strSuch)
If strFind = "" Then Exit Sub
Set SearchRange = ThisWorkbook.Worksheets(1).Range("H:H")
Set rng = Cells.Find(strFind, lookat:=xlPart, LookIn:=xlFormulas)
On Error GoTo 0
If Not rng Is Nothing Then
strAddress = rng.Address
Do
Application.Goto rng, False
If MsgBox("Weiter", vbYesNo + vbQuestion) = vbNo Then Exit Sub
Set rng = Cells.FindNext(After:=ActiveCell)
If rng.Address = strAddress Then Exit Do
Loop
End If
strSuch = strFind
MsgBox "Keine weiteren Fundstellen!", False, Application.UserName
Worksheets(1).Activate
Range("A1").Select
1 Respuesta
Respuesta de paramisolo
1