Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I found some help regarding this as a post to someone elses question.
The solution deletes the formatting in the cells as well. I need to keep the formatting. I'm also having trouble running the macro from another worksheet. The macro is as follows... this is the macro..... Sub clear() Sheets("Payroll - Collections - Pledges").Select ActiveSheet.Unprotect Password:=Password Range("C1:AR142").Select <-RIGHT HERE IS WHERE IT HANGS! Count = 0 On Error Resume Next For Each RNG In Selection If RNG.Locked = False Then Count = Count + 1 If Count = 1 Then Set Unlocked = RNG If Count < 1 Then Set Unlocked = Union(Unlocked, RNG) End If Next RNG Unlocked.clear <-NEED FORMATTING TO STAY! ActiveSheet.Protect Password:=Password End Sub Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Excel how do I delete or change the name of a range of cells? | Excel Discussion (Misc queries) | |||
How to Delete Contents of D2 if B2 = "SD" | New Users to Excel | |||
How do I print a cell's contents as a footer? | Setting up and Configuration of Excel | |||
Delete - Shift Cells UP problem | Excel Discussion (Misc queries) | |||
How can I merge unlocked cells in a worksheet that has been protec | Excel Discussion (Misc queries) |