Copy image from a userform to a cell

Solved
Bob0876 Posted messages 41 Status Member -  
f894009 Posted messages 17417 Registration date   Status Member Last intervention   -
Hello,

I’d like to copy an image inserted in a userform into a cell, but I don’t know how?

Thank you.

4 answers

f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
 
0
Bob0876 Posted messages 41 Status Member
 
Thank you, but despite your help I still don’t understand how to cut out the image from the userform and paste it into a cell.
0
Bob0876 Posted messages 41 Status Member
 
here is a part of my 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 is the name of the existing userform (verified)
0
f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
 
Re,

this part works without problems

[code block preserved as is in the original]

Please detail a little more what is not going right !!!!!!!!!!!!!!!!!!!!

See you soon
0