Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlight Cell
is there a way to have a cell highlighted when it is selected? any cell.
also is it possible to get rid of the thicker border around the cell selected? Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlight Cell
Hi Choice,
See Chip Pearson's 'Highlight Active Cell ' page at: http://www.cpearson.com/excel/excelM...ightActiveCell --- Regards, Norman "choice" wrote in message ... is there a way to have a cell highlighted when it is selected? any cell. also is it possible to get rid of the thicker border around the cell selected? Thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlight Cell
The problem with highlight code is that it leaves the cell highlighted on
workbook close and forgets its on subsequent open. Hence, the cell stays highlighted. This in theory should fix the problems. Granted, I never use it so maybe it's not that reliable. I hate cell highlighting, sound effects, and sin of all sins: Flashing Cells !!! Since you've proven you have no taste whatsoever by asking for cell highlighting then maybe you'll like my code <g. As far as getting rid of the selection border, I don't think anyone has found a solution short of colouring all cells dark gray (color index 16 I think) or other kludge. IMO, this is not supported by VBA and is integral to Excel, hence API code won't help. In the ThisWorkbook module paste the following: Private Sub Workbook_Deactivate() If Not PrevCell Is Nothing Then _ PrevCell.Interior.ColorIndex = PrevColor End Sub In the worksheet code module paste the following: Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Target.Count 1 Then Exit Sub If PrevCell Is Nothing Then Set PrevCell = Target PrevColor = PrevCell.Interior.ColorIndex Else PrevCell.Interior.ColorIndex = PrevColor Set PrevCell = Target PrevColor = Target.Interior.ColorIndex End If Target.Interior.ColorIndex = 6 End Sub In a standard module paste the following: Public PrevCell As Range Public PrevColor As Integer Regards, Greg "choice" wrote: is there a way to have a cell highlighted when it is selected? any cell. also is it possible to get rid of the thicker border around the cell selected? Thanks in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlight Cell
Hi Greg,
As far as getting rid of the selection border, I don't think anyone has found a solution Surely, however, if the sound effects were sufficiently, enterprisingly selected and the strobic flashing optimally calculated, the selection borders would be rendered undetectable? --- Regards, Norman "Greg Wilson" wrote in message ... The problem with highlight code is that it leaves the cell highlighted on workbook close and forgets its on subsequent open. Hence, the cell stays highlighted. This in theory should fix the problems. Granted, I never use it so maybe it's not that reliable. I hate cell highlighting, sound effects, and sin of all sins: Flashing Cells !!! Since you've proven you have no taste whatsoever by asking for cell highlighting then maybe you'll like my code <g. As far as getting rid of the selection border, I don't think anyone has found a solution short of colouring all cells dark gray (color index 16 I think) or other kludge. IMO, this is not supported by VBA and is integral to Excel, hence API code won't help. In the ThisWorkbook module paste the following: Private Sub Workbook_Deactivate() If Not PrevCell Is Nothing Then _ PrevCell.Interior.ColorIndex = PrevColor End Sub In the worksheet code module paste the following: Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Target.Count 1 Then Exit Sub If PrevCell Is Nothing Then Set PrevCell = Target PrevColor = PrevCell.Interior.ColorIndex Else PrevCell.Interior.ColorIndex = PrevColor Set PrevCell = Target PrevColor = Target.Interior.ColorIndex End If Target.Interior.ColorIndex = 6 End Sub In a standard module paste the following: Public PrevCell As Range Public PrevColor As Integer Regards, Greg "choice" wrote: is there a way to have a cell highlighted when it is selected? any cell. also is it possible to get rid of the thicker border around the cell selected? Thanks in advance |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Highlight Cell
Like your idea about using Ctrl_V better Norman <g.
Regards, Greg "Norman Jones" wrote: Hi Greg, As far as getting rid of the selection border, I don't think anyone has found a solution Surely, however, if the sound effects were sufficiently, enterprisingly selected and the strobic flashing optimally calculated, the selection borders would be rendered undetectable? --- Regards, Norman "Greg Wilson" wrote in message ... The problem with highlight code is that it leaves the cell highlighted on workbook close and forgets its on subsequent open. Hence, the cell stays highlighted. This in theory should fix the problems. Granted, I never use it so maybe it's not that reliable. I hate cell highlighting, sound effects, and sin of all sins: Flashing Cells !!! Since you've proven you have no taste whatsoever by asking for cell highlighting then maybe you'll like my code <g. As far as getting rid of the selection border, I don't think anyone has found a solution short of colouring all cells dark gray (color index 16 I think) or other kludge. IMO, this is not supported by VBA and is integral to Excel, hence API code won't help. In the ThisWorkbook module paste the following: Private Sub Workbook_Deactivate() If Not PrevCell Is Nothing Then _ PrevCell.Interior.ColorIndex = PrevColor End Sub In the worksheet code module paste the following: Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Target.Count 1 Then Exit Sub If PrevCell Is Nothing Then Set PrevCell = Target PrevColor = PrevCell.Interior.ColorIndex Else PrevCell.Interior.ColorIndex = PrevColor Set PrevCell = Target PrevColor = Target.Interior.ColorIndex End If Target.Interior.ColorIndex = 6 End Sub In a standard module paste the following: Public PrevCell As Range Public PrevColor As Integer Regards, Greg "choice" wrote: is there a way to have a cell highlighted when it is selected? any cell. also is it possible to get rid of the thicker border around the cell selected? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I auto highlight a cell with the same data as another cell | Excel Worksheet Functions | |||
how to highlight more related cells if cell highlight | Excel Discussion (Misc queries) | |||
Highlight Cell Based Upon Referenced Cell Data | Excel Worksheet Functions | |||
click on one cell to find and highlight a related cell? | Excel Discussion (Misc queries) | |||
Highlight cells with ctrl-click but only un-highlight one cell | Excel Discussion (Misc queries) |