Professional Documents
Culture Documents
08
Dim Ruta As String
09
Dim Fotos As Object
10
11
12
'Saltamos posibles errores
13
On Error Resume Next
14
Application.ScreenUpdating = False
15 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
16
Dim img As Shape
17
'si existe alguna foto, la borro:
18
On Error Resume Next
19
For Each img In ActiveSheet.Shapes
20
21
22
23
24
25
26
27
28
29
30
52
53
54
55
56
57
58
59
82
83
Set r1 = Nothing
84
85
86
87
Application.ScreenUpdating = True
End Sub
Sub Logo_corpac()
Dim h As Integer
Dim ruta as string
Ruta = "C:\Users\niko\Desktop\1.jpg"
Worksheets(h).Select
Range("C2").Select
Set Fotos = ActiveSheet.Shapes.AddPicture(Filename:=Ruta,
_
linktofile:=msoFalse, savewithdocument:=msoCTrue, _
Left:=0, Top:=0, Width:=-1, Height:=-1)
Range("G12").Select
End Sub