Yes that should be possible.
Change the highlighting code to this
'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
ThisWorkbook.Names.Add "'" & Me.Name & "'!_HiLite", True
Cells.FormatConditions.Delete
With Target
With .EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With
With .EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
End With
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
and add this printing code
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim hilite As Boolean
With ActiveSheet
hilite = False
On Error Resume Next
hilite = Evaluate(.Names(ActiveSheet.Name & _
"!__Hilite").RefersTo)
On Error GoTo 0
If hilite Then
.FormatConditions.Delete
End If
End With
End Sub
This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"Indiana Jay" wrote in message
...
Dear Bob,
I tried this at work this morning and it was excellent! I really
appreciate
the tip. However, as I do not use macros much and am not familiar with
event
codes, when I went to print the highlight showed on the printout. ):
Is there a way to turn this off for printing purposes?
Thanks,
Jay
"Bob Phillips" wrote:
Well I hope you get your wish and sorry for trying to help.
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"Indiana Jay" wrote in message
...
I don't want some workaround macro, I want the feature built in.
"Bob Phillips" wrote:
This has been previously posted here http://tinyurl.com/bhhnr
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"Indiana Jay" <Indiana wrote in
message
...
I would like to highlight a row or column with my cursor and have
it
scroll
as I move my cursor so that I can see what items are in the same
row/column
that my cursor is in.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to
the
suggestions with the most votes. To vote for this suggestion,
click
the "I
Agree" button in the message pane. If you do not see the button,
follow
this
link to open the suggestion in the Microsoft Web-based Newsreader
and
then
click "I Agree" in the message pane.
http://www.microsoft.com/office/comm...id=50c21b19-ae
38-4a89-a0a9-b17ffcf73a30&dg=microsoft.public.excel.misc