Codigo 2

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next If Target.Cells = Range("K2") Then foto = Range("E8").Value Application.

ScreenUpdating = False foto = foto & ".jpg" ruta = ActiveWorkbook.Path & "\fotos\" & foto Me.Shapes("foto_del").Delete Set fotografia = Me.Pictures.Insert(ruta) With Range("C5:H12") Arriba = .Top Izquierda = .Left Ancho = .Offset(0, .Columns.Count).Left - .Left Alto = .Offset(.Rows.Count, 0).Top - .Top End With With fotografia .Name = "foto_del" .Top = Arriba .Left = Izquierda .Width = Ancho .Height = Alto End With Set fotografia = Nothing Application.ScreenUpdating = True End If

You might also like