lior03
12-12-2005, 01:57 PM
hello
i got the idea for the following sub from johnske's site
the aim is to find all cells in a selection that contains a
similar text format - like four characters ("????")
or all words that begins with a certain letter ("M*")
Sub likeit2()
Application.ScreenUpdating = False
Dim cell As Range
Dim x As String
x = InputBox("select text format")
For Each cell In Selection
Selection.clearformats
If cell Like x Then
cell.Font.ColorIndex = 3
End If
Next
Selection.Font.Bold = True
Application.ScreenUpdating = True
End Sub
i want to enable the user decide what he wants to search and let him find it through an inputbox.
it do not work.maybe i should not enter data using "" to the inputbox?.
any suggestions guys !!
thanks
i got the idea for the following sub from johnske's site
the aim is to find all cells in a selection that contains a
similar text format - like four characters ("????")
or all words that begins with a certain letter ("M*")
Sub likeit2()
Application.ScreenUpdating = False
Dim cell As Range
Dim x As String
x = InputBox("select text format")
For Each cell In Selection
Selection.clearformats
If cell Like x Then
cell.Font.ColorIndex = 3
End If
Next
Selection.Font.Bold = True
Application.ScreenUpdating = True
End Sub
i want to enable the user decide what he wants to search and let him find it through an inputbox.
it do not work.maybe i should not enter data using "" to the inputbox?.
any suggestions guys !!
thanks