Titre du sujet : Re: Créer et Utiliser des listes de choix successives par myDearFriend! le 15/10/2009 21:27:08
Bonsoir gmarin, Guy, le Forum,
Pffffiiouuu, on va peut-être y arriver cette fois...
Bon, toujours en partant du code que je t'ai présenté plus haut, modifie la procédure SuivreLien() comme suit :
Sub SuivreLien(L As Long)
'----------------------------------------------
' 2pme, 9 octobre 2009
'----------------------------------------------
Dim picImage As StdPicture
Dim strURL As String
Dim lngH As Long, lngL As Long
strURL = Feuil1.Cells(L + 2, 6).Hyperlinks(1).Address
If InStr(strURL, ":") = 0 Then
strURL = ThisWorkbook.Path & "\" & strURL
End If
On Error Resume Next
shaImage.Delete ' Pour se débarasser de l'image précédente
On Error GoTo 0
Set picImage = LoadPicture(strURL)
lngH = picImage.Height / 100
lngL = picImage.Width / 100
Set shaImage = Feuil2.Shapes.AddPicture(strURL, msoTrue, msoFalse, 200, 10, lngL, lngH)
With shaImage
.LockAspectRatio = msoTrue ' Assure une taille proportionnelle
.Height = 200 ' Unités : point. Tu peux ajuster selon ta préférence.
End With
End Sub
Cordialement,
|