Abaxio adaptação , mas dá erro , no depurador
Private Sub BTNEND_Click()
Dim FindString As String
Dim rng As Range
FindString = InputBox("Digite um valor a pesquisar")
If Trim(FindString) <> "" Then
With Workbooks("CANHOTOS2014.xlsm")
Set rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
'Application.Goto Rng, True
MsgBox "Valor se encontra em:" & rng.Address
Else
MsgBox "Não encontrado"
End If
End With
End If
End Sub
Postado : 01/09/2014 1:23 pm