Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that deletes all conditonal formatting from several
worksheets. I set all worksheets protection UserInterfaceOnly:= True when the workbook is opened. But when I run the macro below I get an Error: Application-defined or object-defined error. If I unprotect the sheets it works fine. I thought UserInterfaceOnly = True would allow all macros to work. Anyone have any ideas? Private Sub ClearDeptSchedules() Dim wks As Worksheet Dim lngLastRow As Long For Each wks In colDepts With wks lngLastRow = .Cells(Rows.Count, "A").End(xlUp).Row If lngLastRow = 5 Then .Rows("5:" & lngLastRow).Delete Shift:=xlUp End If ERROR .Cells.FormatConditions.Delete .Range("H1") = Now End With Next wks End Sub Cheers, Ryan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro doesn't work on UserInterfaceOnly-protected sheet | Excel Programming | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Strange problems with setting hidden property of a range when sheet protected with UserInterfaceOnly | Excel Programming | |||
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? | Excel Programming | |||
validation lists and protected work sheets | Excel Programming |