Delimitar rango objeto de la buqueda
Que Tal :)
Nececito que me heches la mano con este detalle porfa, explico
quiero que mi macro buscar , busque dentro de un rango determinado ( en este caso la columna H)
aqui mi codigo
Te agradesco de ante mano
Private Sub CommandButton1_Click()
Dim rng As Range
Dim strAddress As String, strFind As String
'Beginn
strFind = InputBox("Bitte Suchbegriff eingeben:", Application.UserName, strSuch)
If strFind = "" Then Exit Sub
Set rng = Cells.Find(strFind, lookat:=xlPart, LookIn:=xlFormulas)
On Error GoTo 0
If Not rng Is Nothing Then
strAddress = rng.Address
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
End Sub
Nececito que me heches la mano con este detalle porfa, explico
quiero que mi macro buscar , busque dentro de un rango determinado ( en este caso la columna H)
aqui mi codigo
Te agradesco de ante mano
Private Sub CommandButton1_Click()
Dim rng As Range
Dim strAddress As String, strFind As String
'Beginn
strFind = InputBox("Bitte Suchbegriff eingeben:", Application.UserName, strSuch)
If strFind = "" Then Exit Sub
Set rng = Cells.Find(strFind, lookat:=xlPart, LookIn:=xlFormulas)
On Error GoTo 0
If Not rng Is Nothing Then
strAddress = rng.Address
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
End Sub
1 respuesta
Respuesta de paramisolo
1