muhittinemmi
New Member
- Joined
- Jun 20, 2023
- Messages
- 19
VBA Code:
Sub Belirli_Bir_Alandaki_Resimleri_Sil()
Dim Resim As Picture, Alan As Range
Set Alan = Range("a1:a20")
For Each Resim In ActiveSheet.Pictures
If Not Intersect(Resim.TopLeftCell, Alan) Is Nothing Then
Resim.Delete
End If
Next
Set Alan = Nothing
End Sub
I am running this code in a new excel sheet without any problem to delete the picture in a3 and b20.
I get Runtime error 13 Type Mismatch Error when I add it to the module and run it on the page with my existing codes.
The error lines are as follows
For Each Resim In ActiveSheet.Pictures