Results 1 to 10 of 17

Thread: Highlight Current Row in Excel (VBA)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Transformer's Avatar
    Join Date
    Mar 2012
    Posts
    91
    Rep Power
    14
    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
    Quote Originally Posted by dypang87 View Post
    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?
    Last edited by Transformer; 07-31-2013 at 06:48 AM.
    Regards,

    Transformer

Similar Threads

  1. Replies: 4
    Last Post: 06-01-2013, 01:08 PM
  2. Highlight Active Cell’s Row and Column
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-17-2013, 12:32 AM
  3. Replies: 6
    Last Post: 05-16-2013, 09:56 AM
  4. Help- Locking column basis current date.
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 1
    Last Post: 03-25-2013, 04:44 PM
  5. Moving Current Latest Data To New Workbook
    By Terry in forum Excel Help
    Replies: 1
    Last Post: 01-19-2013, 12:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •