ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,730
- Office Version
- 2007
- Platform
- Windows
On my worksheet called INV i use this code shown below which looks at the value in cell G13, then opens worksheet called DATABASE & selects the cell in column A that matches.
This works fine BUT if i want to use the arrow on the keyboard to then select cell in column B C D etc etc i see that i cant move from the cell in column A
The only way i can do it is by using my left mouse button.
Do you see why Thanks.
This works fine BUT if i want to use the arrow on the keyboard to then select cell in column B C D etc etc i see that i cant move from the cell in column A
The only way i can do it is by using my left mouse button.
Do you see why Thanks.
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