Copier image d'un userform vers cellule

Résolu
Bob0876 Messages postés 40 Date d'inscription   Statut Membre Dernière intervention   -  
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

j'aimerais copier une image inséré dans un userform dans une cellule mais je ne sais pas comment ?


Merci,
A voir également:

4 réponses

f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
0
Bob0876 Messages postés 40 Date d'inscription   Statut Membre Dernière intervention  
 
Merci, mais malgré votre aide je ne comprend pas plus comment sectionné l'image du userform et la coller dans une cellule
0
Bob0876 Messages postés 40 Date d'inscription   Statut Membre Dernière intervention  
 
voici une partie de mon code

ww = mn & 5 & aw + 3

Set b = VBA.UserForms.Add(ww)

If b.Image1.Tag <> "" Then

Workbooks("Formulaire.xlsm").Worksheets("ajdonne").Pictures.Insert(b.Image1.Tag).Select

Selection.Top = Range("k1").Top
Selection.Left = Range("k1").Left

End If

If b.Image2.Tag <> "" Then

Workbooks("Formulaire.xlsm").Worksheets("ajdonne").Pictures.Insert(b.Image2.Tag).Select

Selection.Top = Range("k25").Top
Selection.Left = Range("k25").Left

End If

Private Sub CommandButton2_Click()

(...)

Me.Image1.Picture = LoadPicture(FichImg)

Me.Image1.Tag = FichImg

(...)

end sub

ww est le nom du userform existant (vérifié)
0
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Re,


cette partie marche sans probleme

Sub test()
ww = "userform2"

Set b = VBA.UserForms.Add(ww)

If b.Image1.Tag <> "" Then

Workbooks("Formulaire.xlsm").Worksheets("Accueil").Pictures.Insert(b.Image1.Tag).Select

Selection.Top = Range("k1").Top
Selection.Left = Range("k1").Left

End If

If b.Image2.Tag <> "" Then

Workbooks("Formulaire.xlsm").Worksheets("ajdonne").Pictures.Insert(b.Image2.Tag).Select

Selection.Top = Range("k25").Top
Selection.Left = Range("k25").Left

End If
End Sub


Veuillez detailler un peu plus ce qui ne va pas !!!!!!!!!!!!!!!!!!!!

A+
0