VBA To Change Found Cell Color
Closed
azmiismail
Posts
17
Registration date
Thursday March 3, 2011
Status
Member
Last seen
July 20, 2011
-
Mar 11, 2011 at 10:05 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 12, 2011 at 12:32 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 12, 2011 at 12:32 AM
Related:
- VBA To Change Found Cell Color
- Vba color index - Guide
- Notepad++ change background color - Guide
- Excel cell color formula - Guide
- How to change text color in html - Guide
- Vba case like - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 12, 2011 at 12:32 AM
Mar 12, 2011 at 12:32 AM
your macrfo is ok . it goes to rng only ----only part of the screen is shown on the monitor to avoid this selected view I have slightly modified and now you sese
Sub Find_Data()
Dim FindString As String
Dim Rng As Range
FindString = InputBox("Enter Staff Number")
If Trim(FindString) <> "" Then
With Sheets("B2JT").Range("A:Z")
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
Rng.Interior.ColorIndex = 6
MsgBox Rng.Address
Else
MsgBox "Nil"
End If
End With
End If
Worksheets("b2jt").Activate
Range("A1").Select
End Sub