View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default How to stop CommandButtons being deleted as pictures in code??

Hi Corey,

Try:

'=============
Public Sub Tester()
Dim SH As Worksheet
Dim SHP As Shape

For Each SH In ThisWorkbook.Worksheets
For Each SHP In SH.Shapes
With SHP
If .Type = msoPicture Then
.Delete
End If
End With
Next SHP
Next SH
End Sub
'<<=============


---
Regards,
Norman



"Corey" wrote in message
...
Dim SHP As Shape

For Each SHP In ActiveSheet.Shapes <======== How can i change this to
ALL Sheets in workbook ?
With SHP
If .Type = msoPicture Then
.Delete
End If
End With
Next SHP

Corey....