1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Sub test()
'
Dim reponse As String
reponse = InputBox("nom de l image ?")
ActiveCell.Select
ActiveSheet.Pictures.Insert( _
"C:\DossierA\Image\" & reponse & ".gif").Select
Dim nom As String
nom = "C:\DossierA\Image\" & reponse & ".gif"
If Right(nom, 5) = "1.gif" Then
With Selection
.ShapeRange.IncrementTop 49.5
.ShapeRange.IncrementLeft 7.5
End With
ElseIf Right(nom, 5) = "2.gif" Then
With Selection
.ShapeRange.IncrementTop 15
.ShapeRange.IncrementLeft 3
End With
ElseIf Right(nom, 5) = "5.gif" Then
With Selection
.ShapeRange.IncrementLeft 15
.ShapeRange.IncrementTop 96
End With
End If
End Sub |
Partager