C
Corey
The below code is being used to remove any values from all cells that are not locked.
But i want to add a line to delete ALL pictures in the same sheet (Sheet1 = Layout Sheet) that are
also NOT LOCKED.
I have some logo's on the sheet that i have LOCKED, so i do NOT want these deleted.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Button72_Click()
Application.DisplayAlerts = False
' Delete Unlocked Pictures code here
'
'
' Then clear cell contents that are Unlocked
With Sheet1
..Select
..Unprotect
Dim c As Range
For Each c In Sheets("Layout Sheet").UsedRange
If c.Locked = False Then
c.Value = ""
End If
Next
..Protect
End With
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can anyone help?
Corey....
But i want to add a line to delete ALL pictures in the same sheet (Sheet1 = Layout Sheet) that are
also NOT LOCKED.
I have some logo's on the sheet that i have LOCKED, so i do NOT want these deleted.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Button72_Click()
Application.DisplayAlerts = False
' Delete Unlocked Pictures code here
'
'
' Then clear cell contents that are Unlocked
With Sheet1
..Select
..Unprotect
Dim c As Range
For Each c In Sheets("Layout Sheet").UsedRange
If c.Locked = False Then
c.Value = ""
End If
Next
..Protect
End With
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can anyone help?
Corey....