
for nex en ppt
Publicado por Emiliano (3 intervenciones) el 12/06/2017 22:29:51
hola buenas tardes el siguiente codigo es de una macro en ppt pero el for siclo for nex no me ejecuta la macro en todas las diapositivas
espero alguien pueda alludarme
de antemano muchas gracias
espero alguien pueda alludarme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Sub conmanejadordeerrores()
Dim i As Integer
'en caso de encontrar un error sigue ejecutando la macro
On Error Resume Next
For i = 1 To 100
'modificaremos el tamaño de la imagen
With ActiveWindow.Selection.SlideRange
With .Shapes(i)
.Fill.Transparency = 0
.LockAspectRatio = msoFalse
.Height = 500
.Width = 900
.IncrementLeft 175 * IIf((i - 1) Mod 2, -1, 1)
.IncrementTop 100 * IIf(n > 2, -1, 1)
End With
End With
Dim mi_imagen As Shape
Set mi_imagen = ActivePresentation.Slides(100).Shapes(1)
With mi_imagen
.Left = 30
.Top = 20
End With
Next i
On Error GoTo 0
End Sub
de antemano muchas gracias
Valora esta pregunta


0