ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
Hi,
Code in use is shown below.
This is how the code works.
Worksheet INV in cell G13 will be a customers name,example TOM JONES 001
The code then looks in worksheet DATABASE column A for a match.
Once a match is found the cell is selected & its interior is coloured Red.
The problem i have is trying to use the arrows or tab button on the keyboard does nothing at all.
I must use the mouse.
Do you see an issue as to why this is happening please.
Code in use is shown below.
This is how the code works.
Worksheet INV in cell G13 will be a customers name,example TOM JONES 001
The code then looks in worksheet DATABASE column A for a match.
Once a match is found the cell is selected & its interior is coloured Red.
The problem i have is trying to use the arrows or tab button on the keyboard does nothing at all.
I must use the mouse.
Do you see an issue as to why this is happening please.
Rich (BB code):
Private Sub GoToCustomer_Click()
Dim FindString As String
Dim rng As Range
If Range("G13") = "" Then
MsgBox "NO NAME SELECTED IN THE CUSTOMER DETAILS SECTION", vbCritical, "NO CUSTOMER SELECTED MESSAGE"
End If
FindString = Range("G13").Value
If Trim(FindString) <> "" Then
With Sheets("DATABASE").Range("A:A")
Application.EnableEvents = False
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
ActiveCell.Interior.Color = vbRed
Application.EnableEvents = True
Else
MsgBox "CUSTOMER NOT FOUND"
End If
End With
End If
End Sub