Find value with the help of macro.
Hi
Here is something I did write on fly - check this out.
------
Sub SearchEntry()
Dim MyString As String
Dim MyCase As Boolean
MyString = InputBox("Enter the string to search!")
MyCase = MsgBox("Do you want the search to be case sensitive?", vbYesNo)
On Error GoTo NoString
ActiveSheet.UsedRange.Find(What:=MyString, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=MyCase).Activate
Exit Sub
NoString:
MsgBox "The string was not found!"
End Sub
------------
--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )
"Heera" wrote in message
...
Hi,
Normally in excel we find a value with the help of ctrl+F and then
find it.
But when i recored a macro to do the same it is giving an error can
some help me to solve this issue.
All the values in my sheet are unique value.
Regards
Heera
|