Option Explicit
Sub findvalue()
Dim Ans As String
Dim FoundCell As Range
Ans = InputBox("Search for?")
If Trim(Ans) = "" Then
Exit Sub
End If
Set FoundCell = Columns(1).Find(Ans)
If FoundCell Is Nothing Then
MsgBox Ans & " wasn't found"
Else
FoundCell.EntireRow.Select
End If
End Sub
"Susana C via OfficeKB.com" wrote:
I'm sorry, one more thing also... if it doesn't find what I've entered, can
it return a message to say "Code not found" instead of bringing the debug
editor up?
Thanks again!
Susana C wrote:
Thank you. This does close the dialogue box; is there a way to make it
hightlight/ select the whole row?
This might be easier.
[quoted text clipped - 8 lines]
Thanks for any help!
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200612/1
--
Dave Peterson