Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How can deactivate the function Sub Worksheet_SelectionChange? -- haneira ------------------------------------------------------------------------ haneira's Profile: http://www.excelforum.com/member.php...o&userid=24065 View this thread: http://www.excelforum.com/showthread...hreadid=372145 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want the currently selected range/cell to be colored and the
color cleared from the previously selected range or cell, then you will need to keep track of that last range selected. Declare a private variable at the module level, and set its range upon activation. Then when SelectionChange is called, clear the last range, color the target range and set the last range variable to the current target, as follows Private lastRange As Range ' module level declaration Private Sub Worksheet_Activate() Set lastRange = ActiveCell End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) lastRange.Interior.ColorIndex = xlColorIndexNone Target.Interior.Color = RGB(255, 255, 0) ' yellow Set lastRange = Target End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This maybe useful for you ?? http://office.microsoft.com/en-us/as...366231033.aspx If conditionall formating is a problem ... then here is an alternative. http://www.xcelfiles.com/Excel02.html#anchor_67 -- Ivan F Moala ------------------------------------------------------------------------ Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954 View this thread: http://www.excelforum.com/showthread...hreadid=372145 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change tab color based on current color of a cell | Excel Discussion (Misc queries) | |||
Macro to run relative to current selected cell | Excel Discussion (Misc queries) | |||
Change Cell Color if in current Month | Excel Worksheet Functions | |||
how can one obtain the current selected cell value | Excel Programming | |||
Current Cell Color | Excel Worksheet Functions |