high-lite the active cell's row when mouse cursor is in plac - Page 2
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: high-lite the active cell's row when mouse cursor is in plac

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Posts
    99
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Dave, I greatly appreciate your help.

    T. Le

  2. #12
    Board Regular
    Join Date
    Feb 2002
    Posts
    99
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-23 19:32, Dave Hawley wrote:
    Hi

    I have a very simple example of this here:
    http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm
    Scroll to the bottom and look at:
    "Automatic Highlighting of Active Row"



    _________________
    Kind Regards
    Dave Hawley
    OzGrid Business Applications
    Microsoft Excel/VBA Training


    [ This Message was edited by: Dave Hawley on 2002-03-23 19:33 ]
    Thank you Dave,
    Tan Le

  3. #13
    New Member
    Join Date
    Mar 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Dave,

    That is a nice code. Is there any way to implement that in a worksheet that already contains conditional formatting so that the row can be higlighted without loosing that pre-existing conditional formatting?

    Thanks.
    Mav

  4. #14
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,579
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Mav

    If you can insert a hidden column (A) and provided you have not used up all 3 conditional formats you can add this as the first condition:
    =$A1=1 (format cells red or whatever)

    Then paste this event procedure into your sheet

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Range("A:A").ClearContents
    ActiveCell.Offset(0, -(Target.Column() - 1)).Value = 1
    End Sub

    This utilises the hidden column A. The event macro first clears column A then adds 1 against the row with the active cell. The conditional formatting temporarily colors the row which has 1 in column A.
    regards
    Derek



  5. #15
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Derek, That is a good way! Mainly for 'ease of read' it could be.


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Range("A:A").ClearContents
    Cells(Target.Row, 1).Value = 1
    End Sub

    _________________
    Kind Regards
    Dave Hawley
    OzGrid Business Applications
    Microsoft Excel/VBA Training


    [ This Message was edited by: Dave Hawley on 2002-03-24 17:37 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com