Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mouse click not selecting correct data point | Charts and Charting in Excel | |||
mouse point changes to paper with bent edge when selecting workshe | Excel Discussion (Misc queries) | |||
Cannot scroll with a Scroll Point Mouse | Excel Discussion (Misc queries) | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) | |||
Use the "mouse over" event to exclude a data point from a series | Charts and Charting in Excel |