Bonjour,
J'utilise ce code pour afficher une image selon une valeur, seulement cette image s'affiche que sur la cellules P91, Alors que je voudrais quelles insert dans les cellules P91 à S92
Mon code:
Set objFeuille = ActiveSheet
' parcour la collection de Shape pour les supprimer sauf celui dont le nom
' est explicitement inscrit
For Each Sh In objFeuille.Shapes
If Sh.Type <> msoFormControl Then
If Sh.Name <> "CommandButton21" And Sh.Name <> "CommandButton2" And Sh.Name <> "CommandButton3" Then Sh.Delete
End If
Next Sh
With Sheets("Facture").Range("AI91")
If .Value > 0 And .Value < 20 Then
Set objPict = objFeuille.Pictures.Insert(Range("AK91") & "\admin" & .Value & ".jpg")
With objPict
.Left = Range("P91").Left
.Top = Range("P91").Top
.Width = Range("P91").Width
.Height = Range("P91").Height
End With
End If
End With
End Sub
J'ai essayé ceci mais c'est pareille.
With Sheets("Facture").Range("AI91")
If .Value > 0 And .Value < 20 Then
Set objPict = objFeuille.Pictures.Insert(Range("AK91") & "\admin" & .Value & ".jpg")
With objPict
.Left = Columns("P").Left
.Top = Rows("91").Top
.Width = Columns("S").Width
.Height = Rows("92").Height
End With
End If
End With
End Sub
Merci de votre généreuse aide.