Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How do I prevent the background from changing when I use Row-Liner in a protected worksheet. I used the following VB Code, but the backgrounds I used changed to white.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static OldCell As Range If Application.CutCopyMode = 0 Then ActiveSheet.Unprotect Password:="union" If Not OldCell Is Nothing Then With OldCell.EntireRow ..Interior.ColorIndex = xlColorIndexNone ..Borders.LineStyle = xlLineStyleNone End With End If Set OldCell = Target With OldCell.EntireRow ..Interior.ColorIndex = 6 ..EntireRow.Borders.LineStyle = xlContinuous End With Else If OldCell Is Nothing Then Set OldCell = Target Else Set OldCell = Union(OldCell, Target) End If End If ActiveSheet.Protect Password:="union" End Sub Submitted via EggHeadCafe - Software Developer Portal of Choice Using VSTO Add-In To Automate Frequent Excel 2007 Tasks http://www.eggheadcafe.com/tutorials...n-to-auto.aspx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protected sheets using "rowliner" | Excel Discussion (Misc queries) | |||
using "ROWLINER" add-in. | Excel Discussion (Misc queries) | |||
RowLiner | Excel Discussion (Misc queries) | |||
Macro to turn on/off rowliner? | Excel Discussion (Misc queries) | |||
Rowliner woes | Excel Discussion (Misc queries) |