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

trillicomm

Board Regular
Joined
Feb 24, 2002
Messages
101
A file has thin row height so I can view many rows on the screen. But sometimes I get mixed up reading different cells of either the above or below ones of the active row (because of small text size, too). If someone can help me script an visible feature VBA macro to colorize the row background in light green and bold type the text from columns A to D, that'd be greatly appreciated. But the row has to return to the normal property when the mouse moves to another cell with respect to the row.

Thank you.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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
OzGrid.BusApp.170x45.gif

This message was edited by Dave Hawley on 2002-03-23 19:33

Thank you Dave,
Tan Le
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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