Page 1 of 1

remove dates and shapes

Posted: Fri May 28, 2021 5:35 pm
by sna
Hi Dear,

I have written a code to delete signatures for all sheets and it works fine but I want to ask for your help how to delete cell contents with dates in all sheets.

Code: Select all

Sub DeletePics()
Dim sht As Worksheet
Application.ScreenUpdating=False
    For Each sht In ThisWorkbook.Worksheets
    sht.Activate
    ActiveSheet.DrawingObjects.Delete
    Next sht
End Sub
Best Wishes,

Re: remove dates and shapes

Posted: Fri May 28, 2021 6:21 pm
by puriwutpokin
Sample code

Code: Select all

Sub DeletePics()
Dim c As Range
Dim sht As Worksheet
Application.ScreenUpdating = False
    For Each sht In ThisWorkbook.Worksheets
    sht.Activate
    For Each c In Range("a1:z100")
    With c
        If .Value = "Date:" Then .Offset(, 1).Resize(, 2).ClearContents
    End With
    Next c
    ActiveSheet.DrawingObjects.Delete
    Next sht
End Sub

Re: remove dates and shapes

Posted: Fri Dec 24, 2021 7:04 pm
by sna
Thank you 😊