Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I haven't tested this manually, actually, but the situation I have now
is this: 1. A3 has this formula so that the rows have alternating colour that hold the alternating pattern even when filtered: =AND(MOD(SUBTOTAL(3,$B3:$B$3),2)=0,$B3<"") 2. The problem lies in that the sheet is protected and because of this, I delete cells via a delete rows macro, which is this: Sub DeleteRow() Dim MyMsgBox As Long MyMsgBox = MsgBox("Are you sure you really want to delete this/these row(s)?? :oD", vbOKCancel + vbExclamation, "Delete ... ?") If MyMsgBox = vbOK Then Selection.EntireRow.Delete ActiveCell.Select ActiveCell.Offset(-1, 0).Select End If ' Re-protects sheet in case anything unprotects it, yet allows vb functioning to remain. With ActiveSheet .EnableAutoFilter = True .Protect UserInterfaceOnly:=True End With End Sub [** Re the above codes, none of them are mine. They were kind gifts from people in this ng.] 3. The challenge is that today I ran into a "glitch" in that rows deleted with the above delete row macro make the alternate colouring not work properly anymore. I'm guessing that this may happen since rows have specific cell references and that when they're deleted, it throws sequencing off somehow (?). Is there another way to delete rows without knocking out the filter-proof alternating row colouring? Seems like a tall order but hopefully there is something that can be done. Thanks! :oD |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS | Excel Discussion (Misc queries) | |||
colour rows alternating colour | Excel Discussion (Misc queries) | |||
Alternating row colour according to month | Excel Discussion (Misc queries) | |||
looking for shape of right-skewed, left-skewed symmetric how do | Setting up and Configuration of Excel | |||
alternating cell colour | New Users to Excel |