You can check cells count.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count >= 2 Then Exit Sub
Application.EnableEvents = False
Range(Target.EntireRow.Address & "," & Target.EntireColumn.Address).Select 'OR Union(Target.EntireRow, Target.EntireColumn).Select
Target.Activate
Application.EnableEvents = True
End Sub
Originally Posted by
dypang87
Although this is excellent, is there a code that will do the same, but, if selecting multiple cells (2 or more) with my mouse, the code becomes void?
Bookmarks