0
Я хочу удалить три TextBox, которые находятся на первом слайде. Я написал этот код, но он не работает! Это мой код:VBA Powerpoint для удаления TextBox
Sub deleteTextBox()
Dim osld As Slide
Dim oShp As Shape
Dim oShp1 As Shape
Dim oShp2 As Shape
Set osld = ActivePresentation.Slides(1)
For Each oShp In osld.Shapes
If oShp.HasTextFrame Then
If oShp.Left = 20 And oShp.Top = 150 Then
oShp.Delete
End If
End If
Next oShp
For Each oShp1 In osld.Shapes
If oShp1.HasTextFrame Then
If oShp1.Left = 20 And oShp1.Top = 200 Then
oShp1.Delete
End If
End If
Next oShp1
For Each oShp2 In osld.Shapes
If oShp2.HasTextFrame Then
If oShp2.Left = 35 And oShp2.Top = 490 Then
oShp2.Delete
End If
End If
Next oShp2
End Sub
Спасибо за вашу помощь
Я нахожу решение, зацикливая форму. Спасибо Джейми – Zigouma