![]() |
How do I shade the active cell in excel
I have added hyperlinks to a spreadsheet, referring to data on another
worksheet in the same file. When clicking on the hyperlink, I would like the resulting text under the active cursor to be highlighted |
How do I shade the active cell in excel
'---------------------------------------------------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) '---------------------------------------------------------------- Cells.FormatConditions.Delete With Target .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. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "RogerK" wrote in message ... I have added hyperlinks to a spreadsheet, referring to data on another worksheet in the same file. When clicking on the hyperlink, I would like the resulting text under the active cursor to be highlighted |
All times are GMT +1. The time now is 02:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com