ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Cursor highlighting (https://www.excelbanter.com/excel-worksheet-functions/9663-cursor-highlighting.html)

mukbibliophile

Cursor highlighting
 
How do I make cursor highlighted border of cells bold?

Rob van Gelder

An example to work from:
http://www.xl-expert.com/html_pages/condFormatting.html


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"mukbibliophile" wrote in message
...
How do I make cursor highlighted border of cells bold?




Bob Phillips

I may be mis-reading what you want to do, but give this a try

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
With Target
.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
End With
.FormatConditions(1).Interior.ColorIndex = 20
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.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"mukbibliophile" wrote in message
...
How do I make cursor highlighted border of cells bold?





All times are GMT +1. The time now is 11:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com