Ciao Andrea,
ho fatto quanto mi hai detto e confermo che il tuo file funziona benissimo, anche con altre immagini. L'immagine che ho inserito viene ridimensionata ma non tagliata. Invece il mio codice non fa la stessa cosa. Ti copio qui sotto il codice che sto usando:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim s As String, LarghezzaInCentimetri As Single
s = ThisWorkbook.Path & ""
With Target
If .Address = "$A$7" Then
If .Value <> "" Then
Me.Image1.Picture = LoadPicture(s & .Value & ".jpg")
Me.Image1.AutoSize = True
Me.Image1.Top = Me.Range("B25").Top
Me.Image1.Left = Me.Range("B25").Left
LarghezzaInCentimetri = 10
Me.Image1.ShapeRange.LockAspectRatio = msoTrue
Me.Image1.Width = Application.CentimetersToPoints(LarghezzaInCentimetri)
End If
ElseIf .Address = "$AJ$27" Then
If .Value <> "" Then
Me.Image2.Picture = LoadPicture(s & .Value & ".jpg")
Me.Image2.AutoSize = True
Me.Image2.Top = Me.Range("Z25").Top
Me.Image2.Left = Me.Range("Z25").Left
LarghezzaInCentimetri = 10
Me.Image2.ShapeRange.LockAspectRatio = msoTrue
Me.Image2.Width = Application.CentimetersToPoints(LarghezzaInCentimetri)
End If
End If
End With
End Sub
Posso in alternativa mandarti tutta la cartella con i file?
Fammi sapere,
Grazie,
Alessio.