Insérer une image et supprimer la bordure

nak

XLDnaute Occasionnel
Bonjour à tous,

J'essai d'insérer une image sous Excel 2007 mais malheureusement je n'arrive pas à supprimer la bordure du rectangle. Il y a un plantage avec la fonction With Shape...
Pouvez vous me conseiller SVP ?

Merci

Dim strImage As String
Dim Sh As Shape
Set Sh = Worksheets("Feuil1").Shapes.AddShape(msoShapeRectangle, 30, 40, 120, 25)
'Ici j'essai de supprimer la bordure et le fond du restangle
'With Shape
'.Fill.Visible = msoFalse
'.Line.Visible = msoFalse
'End With
strImage = ThisWorkbook.Path & "\Capture.JPG"
Sh.Fill.UserPicture strImage
 

Pièces jointes

  • Capture.JPG
    Capture.JPG
    10.7 KB · Affichages: 122
  • image.xlsm
    19.6 KB · Affichages: 58
  • Capture.JPG
    Capture.JPG
    10.7 KB · Affichages: 134
  • image.xlsm
    19.6 KB · Affichages: 65
  • Capture.JPG
    Capture.JPG
    10.7 KB · Affichages: 138
  • image.xlsm
    19.6 KB · Affichages: 62

Hulk

XLDnaute Barbatruc
Re : Insérer une image et supprimer la bordure

Hello,

Essaie comme ceci...
Code:
Dim strImage As String
    Dim Sh As Shape
    Set Sh = Worksheets("Feuil1").Shapes.AddShape(msoShapeRectangle, 30, 40, 120, 25)
    strImage = ThisWorkbook.Path & "\Capture.JPG"
    Sh.Line.Visible = msoFalse
    Sh.Fill.UserPicture strImage
 

Discussions similaires

Statistiques des forums

Discussions
312 505
Messages
2 089 067
Membres
104 016
dernier inscrit
Mokson