If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
colour active cell
The cell is GREEN while ACTIVE and turns WHITE after it is no lnger ACTIVE.
If my cell is already colour coded, it looses its colour when no longer ACTIVE. Can this code be changed so that a cell returns to its ORIGINAL formmating when no longer ACTIVE? Code is: Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static OldCell As Range If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone End If Target.Interior.ColorIndex = 4 Set OldCell = Target End Sub |
#2
|
|||
|
|||
colour active cell
Your question may be better answered in an Excel newsgroup appropriate to
your problem. This newsgroup is dedicated to the Microsoft Access database product. The Microsoft website may have misdirected you. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Ron" wrote in message ... The cell is GREEN while ACTIVE and turns WHITE after it is no lnger ACTIVE. If my cell is already colour coded, it looses its colour when no longer ACTIVE. Can this code be changed so that a cell returns to its ORIGINAL formmating when no longer ACTIVE? Code is: Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static OldCell As Range If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone End If Target.Interior.ColorIndex = 4 Set OldCell = Target End Sub |
Thread Tools | |
Display Modes | |
|
|