AFGPHXExcel
asked on
How do I get Excel VBA to identify a shape as a picture?
I am asking Excel to count shapes on a worksheet and delete them. The goal is to delete buttons, but it is also a deleting a picture. Is it possible to differentiate between the buttons and picture during its count? The code is as follows:
iCount = ActiveSheet.Shapes.Count
For i = iCount To 1 Step -1
ActiveSheet.Shapes(i).Dele te
Next i
Thanks!
iCount = ActiveSheet.Shapes.Count
For i = iCount To 1 Step -1
ActiveSheet.Shapes(i).Dele
Next i
Thanks!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks!
If oleobject then perhaps you will need oleobject but check if thT AFFECTS YOUR PICTURES USING A COPY FIRST.
CHRIS
Open in new window