[VBA-E] Inserer une image a partir d'un userform
Voila je n'arrive pas a trouver la formule exact afin de pouvoir inserer un image dans ma feuille, j'ai toujours le même message d'erreur
"La method insert de la classe picture a échoué"
Code:
1 2 3 4 5 6 7 8 9
| ActiveCell.Offset(0, -1).Select
ActiveSheet.Pictures.Insert ( _
"C:\Documents and Settings\Administrateur\Mes documents\Sage\Photos Articles\& Nouvelle_Fiche_A4.TextBox_REF.Value & .jpg")
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 82.5
Selection.ShapeRange.Width = 198.75
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.IncrementLeft 1.5
Selection.ShapeRange.IncrementTop 6# |
Inserer une image a partir d'un userform
J'ai esseillé les deux maniere que tu m'a proposé mais j'ai toujours le même message d'erreur.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Dim stMaVariable As String
stMaVariable = "Nouvelle_Fiche_A4.TextBox_REF.Value"
'MsgBox "c:\tmp\" & stMaVariable & ".doc"
'MsgBox "c:\tmp\ & stMaVariable & .doc"
ActiveSheet.Pictures.Insert _
"C:\Documents and Settings\Administrateur\Mes documents\Sage\Photos Articles\ & stMaVariable & .jpg"
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 82.5
Selection.ShapeRange.Width = 198.75
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.IncrementLeft 1.5
Selection.ShapeRange.IncrementTop 6# |