Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format / Highlight the Active Cell
I have found some good solutions to my problem, but not one that fits
the bill exactly. I'm looking to format the active cell with a yellow background, but I need to ensure that the cell's format previous to it being active remains as it was after the cell is no longer active. All the solutions I have seen remove the background after the cell is no longer active. So, if I have a cell with a black background (for instance) and I make it the active cell the cell will have a yellow background. After I leave that cell, I need it to return to it's previous state - black background, not none. I have tried this code... Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static OldRange As Range On Error Resume Next Target.Interior.ColorIndex = 6 ' yellow - change as needed OldRange.Interior.ColorIndex = xlColorIndexNone Set OldRange = Target End Sub ....and I think the answer may lie here "OldRange.Interior.ColorIndex = xlColorIndexNone" Any help would be greatly appreciated. Thank you in advance! -M |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format / Highlight the Active Cell
I actually figured it out. I lock the workbook and don't allow users to
select locked cells, but do allow users to format cells. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
Active Cell Highlight | Excel Discussion (Misc queries) | |||
Conditional Format to Highlight the Active Cell | Excel Worksheet Functions | |||
Active cell highlight | Excel Discussion (Misc queries) | |||
Highlight Active Cell | Excel Discussion (Misc queries) |