#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default 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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default 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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse click not selecting correct data point DGreenhaff Charts and Charting in Excel 0 April 16th 10 12:02 PM
mouse point changes to paper with bent edge when selecting workshe Ellen Excel Discussion (Misc queries) 0 December 4th 09 09:45 PM
Cannot scroll with a Scroll Point Mouse Jeff (North Carolina) Excel Discussion (Misc queries) 2 January 7th 09 07:39 PM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM
Use the "mouse over" event to exclude a data point from a series Randall Hiltz Charts and Charting in Excel 10 January 19th 05 06:20 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"