![]() |
Mouse point
hello,
i have a data A1:E10 now what i want if mouse point is in A1 then i want highligh that row like A1:E1 same even if mouse would be in B1 need same high lighting whole row A1:E1 thanks in advance |
Mouse point
Right-click on your worksheet tab and select View source. Then paste this
code and see if that does what you want. I'm sure there are other ways this could be done. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select Else End If End Sub HTH, Paul "Tufail" wrote in message ... hello, i have a data A1:E10 now what i want if mouse point is in A1 then i want highligh that row like A1:E1 same even if mouse would be in B1 need same high lighting whole row A1:E1 thanks in advance |
Mouse point
Great ! that's what I was looking, now please can you let me know that how
can i put some color like green or yello A1:E1 "PCLIVE" wrote: Right-click on your worksheet tab and select View source. Then paste this code and see if that does what you want. I'm sure there are other ways this could be done. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select Else End If End Sub HTH, Paul "Tufail" wrote in message ... hello, i have a data A1:E10 now what i want if mouse point is in A1 then i want highligh that row like A1:E1 same even if mouse would be in B1 need same high lighting whole row A1:E1 thanks in advance |
Mouse point
This is for the background of the cells. If you want to change the font
color, use .Font.ColorIndex = <color number If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select With Selection.Interior .ColorIndex = 6 '4 for green, 6 for yellow End With Else End If "Tufail" wrote in message ... Great ! that's what I was looking, now please can you let me know that how can i put some color like green or yello A1:E1 "PCLIVE" wrote: Right-click on your worksheet tab and select View source. Then paste this code and see if that does what you want. I'm sure there are other ways this could be done. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select Else End If End Sub HTH, Paul "Tufail" wrote in message ... hello, i have a data A1:E10 now what i want if mouse point is in A1 then i want highligh that row like A1:E1 same even if mouse would be in B1 need same high lighting whole row A1:E1 thanks in advance |
Mouse point
Thank you very much dear.
"PCLIVE" wrote: This is for the background of the cells. If you want to change the font color, use .Font.ColorIndex = <color number If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select With Selection.Interior .ColorIndex = 6 '4 for green, 6 for yellow End With Else End If "Tufail" wrote in message ... Great ! that's what I was looking, now please can you let me know that how can i put some color like green or yello A1:E1 "PCLIVE" wrote: Right-click on your worksheet tab and select View source. Then paste this code and see if that does what you want. I'm sure there are other ways this could be done. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row < 11 And Target.Column < 6 _ Then Range(Cells(Target.Row, 1), Cells(Target.Row, 5)).Select Else End If End Sub HTH, Paul "Tufail" wrote in message ... hello, i have a data A1:E10 now what i want if mouse point is in A1 then i want highligh that row like A1:E1 same even if mouse would be in B1 need same high lighting whole row A1:E1 thanks in advance |
All times are GMT +1. The time now is 06:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com