Hi

I needs a VBA code to delete all text boxes in a workbook that are blank and all text boxes that have a certain word in them (Hesketh).

I have a lot of unrequired text boxes hidden somewhere in the workbook and have tried to find and delete them by using Go To - Special - Objects and that has found some of them for me to delete but not all. I found a VBA code in another post which would delete all text boxes but there are lots I want to keep. I have also found a code which says it would delete blank text boxes but it didn't work (had a problem with the second line compile error - User-defined type not defined).

Sub DeleteEmptyTextBoxes()
Dim oSld As Slide
Dim oShp As Shape
Dim I As Integer
On Error Resume Next
For Each oSld In ActivePresentation.Slides
For I = oSld.Shapes.Count To 1 Step -1
Set oShp = oSld.Shapes(I)
If oShp.Type = msoTextBox Or oShp.Type = msoAutoShape Then
If oShp.Fill.Visible = False And _
oShp.Line.Visible = False And _
(Not oShp.TextFrame.HasText) Then
oShp.Delete
End If
End If
Set oShp = Nothing
Next I
Next oSld
End Sub

Any help on this would be great.

Michele