NateO
Great work!!.....I have amended code for
alternate use to the CF routine.
I'll keep this routine as an Alternate and
post to my site with Credits of course
<font face=Courier New><SPAN style="color:darkblue">Option</SPAN> <SPAN style="color:darkblue">Explicit</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'/////////////////////////////////</SPAN></SPAN></SPAN>
<SPAN style="color:green">'// Original by NateO for aldo ///</SPAN>
<SPAN style="color:green">'// 24th Jan 2003 ///</SPAN>
<SPAN style="color:green">'// Amended by IFM ///</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'/////////////////////////////////</SPAN></SPAN></SPAN>
<SPAN style="color:green">'// Placed in a Std Module</SPAN>
<SPAN style="color:darkblue">Dim</SPAN> strCol <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">String</SPAN>
<SPAN style="color:darkblue">Dim</SPAN> iCol <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Integer</SPAN>
<SPAN style="color:darkblue">Dim</SPAN> dblRow <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Double</SPAN>
<SPAN style="color:darkblue">Sub</SPAN> HighlightRight()
HighLight 0, 1
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">Sub</SPAN> HighlightLeft()
HighLight 0, -1
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">Sub</SPAN> HighlightUp()
HighLight -1, 0, -1
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">Sub</SPAN> HighlightDown()
HighLight 1, 0, 1
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">Sub</SPAN> HighLight(dblxRow <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Double</SPAN>, iyCol <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Integer</SPAN>, <SPAN style="color:darkblue">Optional</SPAN> dblZ <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Double</SPAN> = 0)
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// Amended to highlight Activecell cross intersection</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// Amended as an Alternative to using Condtional Formats</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// As per Aldo thread;</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// http://www.mrexcel.com/board/viewtopic.php?topic=19239&forum=2&start=20&22</SPAN>
<SPAN style="color:darkblue">On</SPAN> <SPAN style="color:darkblue">Error</SPAN> <SPAN style="color:darkblue">GoTo</SPAN> NoGo
strCol = Mid(ActiveCell.Offset(dblxRow, iyCol).Address, _
InStr(ActiveCell.Offset(dblxRow, iyCol).Address, "$") + 1, _
InStr(2, ActiveCell.Offset(dblxRow, iyCol).Address, "$") - 2)
iCol = ActiveCell.Column
dblRow = ActiveCell.Row
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// If you don<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>t want screen flicker</SPAN>
Application.ScreenUpdating = <SPAN style="color:darkblue">False</SPAN>
<SPAN style="color:darkblue">With</SPAN> Range(strCol & ":" & strCol & "," & dblRow + dblZ & ":" & dblRow + dblZ)
.<SPAN style="color:darkblue">Select</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// Need to reset here!</SPAN>
Application.ScreenUpdating = <SPAN style="color:darkblue">True</SPAN>
.Item(dblRow + dblxRow).Activate
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">With</SPAN>
NoGo:
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>// Placed in the ThisWorkbook Object</SPAN>
<SPAN style="color:darkblue">Private</SPAN> <SPAN style="color:darkblue">Sub</SPAN> Workbook_Open()
Application.OnKey "{RIGHT}", "HighlightRight"
Application.OnKey "{LEFT}", "HighlightLeft"
Application.OnKey "{UP}", "HighlightUp"
Application.OnKey "{DOWN}", "HighlightDown"
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">Private</SPAN> <SPAN style="color:darkblue">Sub</SPAN> Workbook_BeforeClose(Cancel <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Boolean</SPAN>)
Application.OnKey "{RIGHT}"
Application.OnKey "{LEFT}"
Application.OnKey "{UP}"
Application.OnKey "{DOWN}"
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>EDIT: There is a slight screenflicker when</SPAN>
<SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green"><SPAN style="color:green">'</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>scrolling...Set ASU = False if Req.</SPAN></FONT>
EDIT: There is a slight screenflicker when
scrolling...Set ASU = False if Req.
_________________
Kind Regards,
<font size=+2><font color="red"> I<font color="blue">van<font color="red"> F M</font color="blue">oala</font><font size=1> From the City of Sails