View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default how to high light cells

hi
in your original post, you specified range A2 to CP300 so i see that at the
range with this line

Set r = Range("A1:CP300")

you would have to change that to RAnge("B2:AF300")

As i have written it, anywhere you click on a row with high light the row
for the defined range and the cell clicked on will be the active cell.

try it and see. post back if problems.
Regards
FSt1



"Mike" wrote:

How about this lets say i want to click cell k6 & i want to high light that
entire row from b6 to af6

"FSt1" wrote:

hi
try this and see if it's what you want..
this is worksheet code. right click the sheet and click view code. paste the
below macro into the code window. only works on the sheet that you paste the
code into.
Selecting outside the range A1:CP300 will not highlight cells(rows). you can
adjust the range to suit.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range
Dim ac As Range
Set r = Range("A1:CP300")
Set ac = ActiveCell
If Not Intersect(Target, r) Is Nothing Then
Target.EntireRow.Select
ac.Activate
End If
End Sub

regards
FSt1

"Mike" wrote:

have columns from A1 to A300 TO CP1 TO CP300 if I click on a particulr cell
on any row is it possible to high light that whole row if there is a way
please tell me how!!!