Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

hightlighting rows?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
just1creation - 18 Jul 2006 14:54 GMT
is it possible to a row to be highlighted automatically when the curso
lands on that row?

example:
if my cursor lands on A1, i would like the whole row to be highlighted
and when i press enter and the cursor drops down to A2, then that ro
will be highlighted.  and A1 is no longer highlighted..
Don Guillett - 18 Jul 2006 15:37 GMT
right click sheet tab>view code>insert this>save

'McCurdy.Here is something inspired by Don Guillett.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim MyRng As Range
Set MyRng = Target.EntireRow
Application.EnableEvents = False
On Error GoTo end1
Application.Cells.FormatConditions.Delete
With MyRng
 .FormatConditions.Add Type:=xlExpression, Formula1:= _
       "=ROW()=ROW(INDIRECT(CELL(""address"")))"
 With .FormatConditions(1).Font
      .Bold = True
      .Italic = False
      .ColorIndex = 1
 End With
 .FormatConditions(1).Interior.ColorIndex = 36
End With
end1:
Application.EnableEvents = True
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>
> is it possible to a row to be highlighted automatically when the cursor
[quoted text clipped - 4 lines]
> and when i press enter and the cursor drops down to A2, then that row
> will be highlighted.  and A1 is no longer highlighted...
just1creation - 18 Jul 2006 15:50 GMT
thank you...

Signature

just1creation

just1creation - 18 Jul 2006 16:05 GMT
can you make it so that when you print it still looks the same...
because now when i print it, it shows that it is highlight and in bold
letters.:)

Signature

just1creation

Don Guillett - 18 Jul 2006 16:52 GMT
You can comment out the code or select a cell(row) outside the print range
or use a before print event in the ThisWorkbook module to remove the
formatting.

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>
> can you make it so that when you print it still looks the same...
> because now when i print it, it shows that it is highlight and in bold
> letters.:)
just1creation - 19 Jul 2006 14:23 GMT
how come now i can't copy and paste
Don Guillett - 19 Jul 2006 16:23 GMT
Because this is a SELECTION event. If you want to do that on that sheet then
comment out the code or change to a worksheet_change event so the row will
not be highlighted unless you change something.

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>
> how come now i can't copy and paste?
Don Guillett - 18 Jul 2006 16:11 GMT
glad to help

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>
> thank you...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.