Once cell is selected i am unable to tab out of cell unless i use the mouse.

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,832
Office Version
  1. 2007
Platform
  1. 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.


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
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try deleting the lines
VBA Code:
Application.EnableEvents = False
and
VBA Code:
Application.EnableEvents = True
and replacing the string
VBA Code:
Application.Goto rng, True
with
VBA Code:
rng.Select
(didn't check).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top