drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 543
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and thanks in advance !
I have a CRM sheet where I am inserting some images (X images using a macro, being X dinamic)
Some times I am deleting the inserted images using a macro:
My CRM sheet contains many cells with data validation lists, some tables with the header with arrows, somer cells with Comments, some pivot tables...
Sometimes looks like this macro deletes the "Drop Down Nº" . cells's listboxes etc...
How can avoid this ??
I would like to delete the inserted shapes,, pictures
Not the arrows etc on the cells
I have a CRM sheet where I am inserting some images (X images using a macro, being X dinamic)
Some times I am deleting the inserted images using a macro:
VBA Code:
Dim aImagesToKeep(): aImagesToKeep() = Array("bAAAs", "bConcep", _
"bPath", "bImport", "bSaveCRM", "bUpdateWKB", "bClearCRM", _
"bOpenInvoice", "bCRM_Group")
Dim bDelete As Boolean
Dim YAs Single
Dim X as Byte
For Each SHP In Sheets(wsCRM).Shapes
bDelete = True: Y= Y+ 1
For X = LBound(aImagesToKeep) To UBound(aImagesToKeep)
If LCase(SHP.Name) = LCase(aImagesToKeep(X)) Then
bDelete = False: Exit For
End If
Next X
If bDelete Then
Debug.Print SHP.Name, X, Y
SHP.Delete
End If
Next SHP
My CRM sheet contains many cells with data validation lists, some tables with the header with arrows, somer cells with Comments, some pivot tables...
Sometimes looks like this macro deletes the "Drop Down Nº" . cells's listboxes etc...
How can avoid this ??
I would like to delete the inserted shapes,, pictures
Not the arrows etc on the cells